# QueryInst

Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 18053) END FROM WidgetInst WHERE WidgetInstId = 18053) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18119;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 18054) END FROM WidgetInst WHERE WidgetInstId = 18054) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18120;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 16723) END FROM WidgetInst WHERE WidgetInstId = 16723) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 12233) END FROM WidgetInst WHERE WidgetInstId = 12233)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18127;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 16724) END FROM WidgetInst WHERE WidgetInstId = 16724) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 12233) END FROM WidgetInst WHERE WidgetInstId = 12233)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18128;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 16725) END FROM WidgetInst WHERE WidgetInstId = 16725) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 12233) END FROM WidgetInst WHERE WidgetInstId = 12233)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18129;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 16726) END FROM WidgetInst WHERE WidgetInstId = 16726) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 12233) END FROM WidgetInst WHERE WidgetInstId = 12233)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18130;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 16727) END FROM WidgetInst WHERE WidgetInstId = 16727) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 12233) END FROM WidgetInst WHERE WidgetInstId = 12233)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18131;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 16728) END FROM WidgetInst WHERE WidgetInstId = 16728) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 12233) END FROM WidgetInst WHERE WidgetInstId = 12233)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18132;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 18139) END FROM WidgetInst WHERE WidgetInstId = 18139) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18145;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 18140) END FROM WidgetInst WHERE WidgetInstId = 18140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18146;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 18141) END FROM WidgetInst WHERE WidgetInstId = 18141) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18147;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 18142) END FROM WidgetInst WHERE WidgetInstId = 18142) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18148;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 18143) END FROM WidgetInst WHERE WidgetInstId = 18143) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18149;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 18144) END FROM WidgetInst WHERE WidgetInstId = 18144) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18150;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18302) END FROM WidgetInst WHERE WidgetInstId = 18302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18303;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 18302) END FROM WidgetInst WHERE WidgetInstId = 18302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18305;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18313) END FROM WidgetInst WHERE WidgetInstId = 18313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18319;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18314) END FROM WidgetInst WHERE WidgetInstId = 18314) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18320;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18315) END FROM WidgetInst WHERE WidgetInstId = 18315) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18321;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18316) END FROM WidgetInst WHERE WidgetInstId = 18316) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18322;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18317) END FROM WidgetInst WHERE WidgetInstId = 18317) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18323;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18318) END FROM WidgetInst WHERE WidgetInstId = 18318) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18324;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 18313) END FROM WidgetInst WHERE WidgetInstId = 18313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18331;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 18314) END FROM WidgetInst WHERE WidgetInstId = 18314) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18332;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 18315) END FROM WidgetInst WHERE WidgetInstId = 18315) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18333;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 18316) END FROM WidgetInst WHERE WidgetInstId = 18316) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18334;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 18317) END FROM WidgetInst WHERE WidgetInstId = 18317) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18335;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 18318) END FROM WidgetInst WHERE WidgetInstId = 18318) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18336;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Restart File' AND WidgetInstId = 18375) END FROM WidgetInst WHERE WidgetInstId = 18375) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18376;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Initial Water Surface Elevation' AND WidgetInstId = 18375) END FROM WidgetInst WHERE WidgetInstId = 18375) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18378;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parabolic' AND WidgetInstId = 18383) END FROM WidgetInst WHERE WidgetInstId = 18383) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18384;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Frequency' AND WidgetInstId = 18392) END FROM WidgetInst WHERE WidgetInstId = 18392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18393;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Times' AND WidgetInstId = 18392) END FROM WidgetInst WHERE WidgetInstId = 18392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18395;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Restart File' AND WidgetInstId = 18414) END FROM WidgetInst WHERE WidgetInstId = 18414) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18415;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Initial Water Surface Elevation' AND WidgetInstId = 18414) END FROM WidgetInst WHERE WidgetInstId = 18414) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18417;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parabolic' AND WidgetInstId = 18422) END FROM WidgetInst WHERE WidgetInstId = 18422) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18423;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Frequency' AND WidgetInstId = 18431) END FROM WidgetInst WHERE WidgetInstId = 18431) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18432;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Times' AND WidgetInstId = 18431) END FROM WidgetInst WHERE WidgetInstId = 18431) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18434;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Restart File' AND WidgetInstId = 18453) END FROM WidgetInst WHERE WidgetInstId = 18453) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18454;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Initial Water Surface Elevation' AND WidgetInstId = 18453) END FROM WidgetInst WHERE WidgetInstId = 18453) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18456;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parabolic' AND WidgetInstId = 18461) END FROM WidgetInst WHERE WidgetInstId = 18461) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18462;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Frequency' AND WidgetInstId = 18470) END FROM WidgetInst WHERE WidgetInstId = 18470) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18471;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Times' AND WidgetInstId = 18470) END FROM WidgetInst WHERE WidgetInstId = 18470) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18473;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Flow' AND WidgetInstId = 18520) END FROM WidgetInst WHERE WidgetInstId = 18520) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18521;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 18520) END FROM WidgetInst WHERE WidgetInstId = 18520) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18523;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mixed' AND WidgetInstId = 18528) END FROM WidgetInst WHERE WidgetInstId = 18528) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18529;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 18528) END FROM WidgetInst WHERE WidgetInstId = 18528) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18537;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 18533) END FROM WidgetInst WHERE WidgetInstId = 18533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18539;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 18535) END FROM WidgetInst WHERE WidgetInstId = 18535) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18541;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 18528) END FROM WidgetInst WHERE WidgetInstId = 18528) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18543;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 18533) END FROM WidgetInst WHERE WidgetInstId = 18533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18545;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 18535) END FROM WidgetInst WHERE WidgetInstId = 18535) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18547;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 18528) END FROM WidgetInst WHERE WidgetInstId = 18528) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18549;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 18533) END FROM WidgetInst WHERE WidgetInstId = 18533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18551;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 18535) END FROM WidgetInst WHERE WidgetInstId = 18535) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18553;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 18528) END FROM WidgetInst WHERE WidgetInstId = 18528) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18555;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 18533) END FROM WidgetInst WHERE WidgetInstId = 18533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18557;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 18535) END FROM WidgetInst WHERE WidgetInstId = 18535) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18559;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 18528) END FROM WidgetInst WHERE WidgetInstId = 18528) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18561;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 18533) END FROM WidgetInst WHERE WidgetInstId = 18533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18563;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 18535) END FROM WidgetInst WHERE WidgetInstId = 18535) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18565;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 18528) END FROM WidgetInst WHERE WidgetInstId = 18528) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18567;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 18533) END FROM WidgetInst WHERE WidgetInstId = 18533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18569;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 18535) END FROM WidgetInst WHERE WidgetInstId = 18535) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18571;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 18528) END FROM WidgetInst WHERE WidgetInstId = 18528) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18573;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 18533) END FROM WidgetInst WHERE WidgetInstId = 18533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18575;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 18535) END FROM WidgetInst WHERE WidgetInstId = 18535) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18577;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 18528) END FROM WidgetInst WHERE WidgetInstId = 18528) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18579;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 18528) END FROM WidgetInst WHERE WidgetInstId = 18528) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18581;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 18528) END FROM WidgetInst WHERE WidgetInstId = 18528) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18583;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Aw' AND WidgetInstId = 18528) END FROM WidgetInst WHERE WidgetInstId = 18528) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18585;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rijn' AND WidgetInstId = 18528) END FROM WidgetInst WHERE WidgetInstId = 18528) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18587;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 18528) END FROM WidgetInst WHERE WidgetInstId = 18528) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18589;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 18528) END FROM WidgetInst WHERE WidgetInstId = 18528) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18591;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 18528) END FROM WidgetInst WHERE WidgetInstId = 18528) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18593;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 18528) END FROM WidgetInst WHERE WidgetInstId = 18528) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18595;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 18528) END FROM WidgetInst WHERE WidgetInstId = 18528) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18597;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 18528) END FROM WidgetInst WHERE WidgetInstId = 18528) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18599;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant Length' AND WidgetInstId = 18612) END FROM WidgetInst WHERE WidgetInstId = 18612) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18613;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 18622) END FROM WidgetInst WHERE WidgetInstId = 18622) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18623;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 18625) END FROM WidgetInst WHERE WidgetInstId = 18625) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18626;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 18630) END FROM WidgetInst WHERE WidgetInstId = 18630) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18631;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Input Parameters' AND WidgetInstId = 18630) END FROM WidgetInst WHERE WidgetInstId = 18630) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18633;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 18622) END FROM WidgetInst WHERE WidgetInstId = 18622) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18648;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 18662;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 18662;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 18662;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 18662;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 18662;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 18662;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 18662) END FROM WidgetInst WHERE WidgetInstId = 18662) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18663;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 18665) END FROM WidgetInst WHERE WidgetInstId = 18665) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18666;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 18662) END FROM WidgetInst WHERE WidgetInstId = 18662) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18668;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 44) END FROM WidgetInst WHERE WidgetInstId = 44) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18674;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 44) END FROM WidgetInst WHERE WidgetInstId = 44) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18677;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 18662) END FROM WidgetInst WHERE WidgetInstId = 18662) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18680;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18682) END FROM WidgetInst WHERE WidgetInstId = 18682) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18683;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18682) END FROM WidgetInst WHERE WidgetInstId = 18682) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18686;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 18662) END FROM WidgetInst WHERE WidgetInstId = 18662) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18689;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18691) END FROM WidgetInst WHERE WidgetInstId = 18691) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18692;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18691) END FROM WidgetInst WHERE WidgetInstId = 18691) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18695;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 18691) END FROM WidgetInst WHERE WidgetInstId = 18691) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18698;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 18662) END FROM WidgetInst WHERE WidgetInstId = 18662) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18701;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 18662) END FROM WidgetInst WHERE WidgetInstId = 18662) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18703) END FROM WidgetInst WHERE WidgetInstId = 18703)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18706;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18705) END FROM WidgetInst WHERE WidgetInstId = 18705) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18709;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18705) END FROM WidgetInst WHERE WidgetInstId = 18705) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18710;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18705) END FROM WidgetInst WHERE WidgetInstId = 18705) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18713;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18705) END FROM WidgetInst WHERE WidgetInstId = 18705) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18714;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 18662) END FROM WidgetInst WHERE WidgetInstId = 18662) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18703) END FROM WidgetInst WHERE WidgetInstId = 18703)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18715;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18705) END FROM WidgetInst WHERE WidgetInstId = 18705) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18718;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18705) END FROM WidgetInst WHERE WidgetInstId = 18705) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18719;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18721) END FROM WidgetInst WHERE WidgetInstId = 18721) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18722;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18705) END FROM WidgetInst WHERE WidgetInstId = 18705) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18724;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18705) END FROM WidgetInst WHERE WidgetInstId = 18705) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18725;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 18721) END FROM WidgetInst WHERE WidgetInstId = 18721) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18726;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18705) END FROM WidgetInst WHERE WidgetInstId = 18705) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18728;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18705) END FROM WidgetInst WHERE WidgetInstId = 18705) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18729;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 18662) END FROM WidgetInst WHERE WidgetInstId = 18662) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18730;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 18662) END FROM WidgetInst WHERE WidgetInstId = 18662) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18733;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18766) END FROM WidgetInst WHERE WidgetInstId = 18766) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18767;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18766) END FROM WidgetInst WHERE WidgetInstId = 18766) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18769;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18766) END FROM WidgetInst WHERE WidgetInstId = 18766) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18771;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 18662) END FROM WidgetInst WHERE WidgetInstId = 18662) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18773;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18782) END FROM WidgetInst WHERE WidgetInstId = 18782) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18783;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18782) END FROM WidgetInst WHERE WidgetInstId = 18782) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18785;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18782) END FROM WidgetInst WHERE WidgetInstId = 18782) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18787;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 18662) END FROM WidgetInst WHERE WidgetInstId = 18662) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18789;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18802) END FROM WidgetInst WHERE WidgetInstId = 18802) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18803;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18802) END FROM WidgetInst WHERE WidgetInstId = 18802) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18805;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18802) END FROM WidgetInst WHERE WidgetInstId = 18802) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18807;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 18662) END FROM WidgetInst WHERE WidgetInstId = 18662) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18809;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 18822) END FROM WidgetInst WHERE WidgetInstId = 18822) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18823;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 18822) END FROM WidgetInst WHERE WidgetInstId = 18822) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18825;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 18822) END FROM WidgetInst WHERE WidgetInstId = 18822) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18827;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18828) END FROM WidgetInst WHERE WidgetInstId = 18828) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 18822) END FROM WidgetInst WHERE WidgetInstId = 18822)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18829;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18828) END FROM WidgetInst WHERE WidgetInstId = 18828) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 18822) END FROM WidgetInst WHERE WidgetInstId = 18822)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18831;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18828) END FROM WidgetInst WHERE WidgetInstId = 18828) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 18822) END FROM WidgetInst WHERE WidgetInstId = 18822)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18833;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 18662) END FROM WidgetInst WHERE WidgetInstId = 18662) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18835;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18837) END FROM WidgetInst WHERE WidgetInstId = 18837) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18838;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18837) END FROM WidgetInst WHERE WidgetInstId = 18837) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18841;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 18837) END FROM WidgetInst WHERE WidgetInstId = 18837) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18844;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 18837) END FROM WidgetInst WHERE WidgetInstId = 18837) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18855;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 18662) END FROM WidgetInst WHERE WidgetInstId = 18662) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18858;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18861) END FROM WidgetInst WHERE WidgetInstId = 18861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18862;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18861) END FROM WidgetInst WHERE WidgetInstId = 18861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18865;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 18861) END FROM WidgetInst WHERE WidgetInstId = 18861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18868;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 18861) END FROM WidgetInst WHERE WidgetInstId = 18861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18879;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 18883) END FROM WidgetInst WHERE WidgetInstId = 18883) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18884;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 18883) END FROM WidgetInst WHERE WidgetInstId = 18883) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18886;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 18883) END FROM WidgetInst WHERE WidgetInstId = 18883) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18888;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 18883) END FROM WidgetInst WHERE WidgetInstId = 18883) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18890;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 18883) END FROM WidgetInst WHERE WidgetInstId = 18883) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18892;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 18883) END FROM WidgetInst WHERE WidgetInstId = 18883) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18894;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 189) END FROM WidgetInst WHERE WidgetInstId = 189) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 47) END FROM WidgetInst WHERE WidgetInstId = 47)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18896;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 18898) END FROM WidgetInst WHERE WidgetInstId = 18898) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18899;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 18903;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 18903;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 18903;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 18903;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 18903;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 18903;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 18903) END FROM WidgetInst WHERE WidgetInstId = 18903) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18904;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 18906) END FROM WidgetInst WHERE WidgetInstId = 18906) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18907;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 18903) END FROM WidgetInst WHERE WidgetInstId = 18903) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18909;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18915;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18918;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 18903) END FROM WidgetInst WHERE WidgetInstId = 18903) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18921;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18923) END FROM WidgetInst WHERE WidgetInstId = 18923) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18924;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18923) END FROM WidgetInst WHERE WidgetInstId = 18923) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18927;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 18903) END FROM WidgetInst WHERE WidgetInstId = 18903) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18930;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18932) END FROM WidgetInst WHERE WidgetInstId = 18932) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18933;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18932) END FROM WidgetInst WHERE WidgetInstId = 18932) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18936;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 18932) END FROM WidgetInst WHERE WidgetInstId = 18932) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18939;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 18903) END FROM WidgetInst WHERE WidgetInstId = 18903) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18942;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 18903) END FROM WidgetInst WHERE WidgetInstId = 18903) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18944) END FROM WidgetInst WHERE WidgetInstId = 18944)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18947;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18946) END FROM WidgetInst WHERE WidgetInstId = 18946) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18950;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18946) END FROM WidgetInst WHERE WidgetInstId = 18946) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18951;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18946) END FROM WidgetInst WHERE WidgetInstId = 18946) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18954;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18946) END FROM WidgetInst WHERE WidgetInstId = 18946) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18955;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 18903) END FROM WidgetInst WHERE WidgetInstId = 18903) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18944) END FROM WidgetInst WHERE WidgetInstId = 18944)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18956;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18946) END FROM WidgetInst WHERE WidgetInstId = 18946) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18959;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18946) END FROM WidgetInst WHERE WidgetInstId = 18946) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18960;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18962) END FROM WidgetInst WHERE WidgetInstId = 18962) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18963;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18946) END FROM WidgetInst WHERE WidgetInstId = 18946) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18965;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18946) END FROM WidgetInst WHERE WidgetInstId = 18946) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18966;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 18962) END FROM WidgetInst WHERE WidgetInstId = 18962) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18967;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18946) END FROM WidgetInst WHERE WidgetInstId = 18946) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18969;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18946) END FROM WidgetInst WHERE WidgetInstId = 18946) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18970;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 18903) END FROM WidgetInst WHERE WidgetInstId = 18903) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18971;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 18903) END FROM WidgetInst WHERE WidgetInstId = 18903) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18974;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19007) END FROM WidgetInst WHERE WidgetInstId = 19007) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19008;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19007) END FROM WidgetInst WHERE WidgetInstId = 19007) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19010;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19007) END FROM WidgetInst WHERE WidgetInstId = 19007) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19012;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 18903) END FROM WidgetInst WHERE WidgetInstId = 18903) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19014;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19023) END FROM WidgetInst WHERE WidgetInstId = 19023) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19024;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19023) END FROM WidgetInst WHERE WidgetInstId = 19023) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19026;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19023) END FROM WidgetInst WHERE WidgetInstId = 19023) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19028;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 18903) END FROM WidgetInst WHERE WidgetInstId = 18903) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19030;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19043) END FROM WidgetInst WHERE WidgetInstId = 19043) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19044;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19043) END FROM WidgetInst WHERE WidgetInstId = 19043) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19046;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19043) END FROM WidgetInst WHERE WidgetInstId = 19043) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19048;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 18903) END FROM WidgetInst WHERE WidgetInstId = 18903) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19050;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19063) END FROM WidgetInst WHERE WidgetInstId = 19063) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19064;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19063) END FROM WidgetInst WHERE WidgetInstId = 19063) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19066;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19063) END FROM WidgetInst WHERE WidgetInstId = 19063) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19068;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19069) END FROM WidgetInst WHERE WidgetInstId = 19069) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19063) END FROM WidgetInst WHERE WidgetInstId = 19063)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19070;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19069) END FROM WidgetInst WHERE WidgetInstId = 19069) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19063) END FROM WidgetInst WHERE WidgetInstId = 19063)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19072;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19069) END FROM WidgetInst WHERE WidgetInstId = 19069) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19063) END FROM WidgetInst WHERE WidgetInstId = 19063)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19074;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 18903) END FROM WidgetInst WHERE WidgetInstId = 18903) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19076;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 19078) END FROM WidgetInst WHERE WidgetInstId = 19078) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19079;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19078) END FROM WidgetInst WHERE WidgetInstId = 19078) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19082;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 19078) END FROM WidgetInst WHERE WidgetInstId = 19078) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19085;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 19078) END FROM WidgetInst WHERE WidgetInstId = 19078) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19096;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 18903) END FROM WidgetInst WHERE WidgetInstId = 18903) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19099;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 19102) END FROM WidgetInst WHERE WidgetInstId = 19102) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19103;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19102) END FROM WidgetInst WHERE WidgetInstId = 19102) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19106;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 19102) END FROM WidgetInst WHERE WidgetInstId = 19102) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19109;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 19102) END FROM WidgetInst WHERE WidgetInstId = 19102) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19120;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 19124) END FROM WidgetInst WHERE WidgetInstId = 19124) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19125;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19124) END FROM WidgetInst WHERE WidgetInstId = 19124) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19127;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19124) END FROM WidgetInst WHERE WidgetInstId = 19124) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19129;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19124) END FROM WidgetInst WHERE WidgetInstId = 19124) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19131;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19124) END FROM WidgetInst WHERE WidgetInstId = 19124) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19133;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19124) END FROM WidgetInst WHERE WidgetInstId = 19124) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19135;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 18903) END FROM WidgetInst WHERE WidgetInstId = 18903) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 18520) END FROM WidgetInst WHERE WidgetInstId = 18520)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19137;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 19139) END FROM WidgetInst WHERE WidgetInstId = 19139) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19140;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 19144;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 19144;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 19144;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 19144;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 19144;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 19144;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 19144) END FROM WidgetInst WHERE WidgetInstId = 19144) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19145;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 19147) END FROM WidgetInst WHERE WidgetInstId = 19147) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19148;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 19144) END FROM WidgetInst WHERE WidgetInstId = 19144) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19150;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19156;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19159;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 19144) END FROM WidgetInst WHERE WidgetInstId = 19144) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19162;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 19164) END FROM WidgetInst WHERE WidgetInstId = 19164) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19165;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19164) END FROM WidgetInst WHERE WidgetInstId = 19164) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19168;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 19144) END FROM WidgetInst WHERE WidgetInstId = 19144) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19171;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 19173) END FROM WidgetInst WHERE WidgetInstId = 19173) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19174;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19173) END FROM WidgetInst WHERE WidgetInstId = 19173) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19177;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 19173) END FROM WidgetInst WHERE WidgetInstId = 19173) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19180;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 19144) END FROM WidgetInst WHERE WidgetInstId = 19144) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19183;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 19144) END FROM WidgetInst WHERE WidgetInstId = 19144) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 19185) END FROM WidgetInst WHERE WidgetInstId = 19185)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19188;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 19187) END FROM WidgetInst WHERE WidgetInstId = 19187) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19191;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 19187) END FROM WidgetInst WHERE WidgetInstId = 19187) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19192;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 19187) END FROM WidgetInst WHERE WidgetInstId = 19187) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19195;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 19187) END FROM WidgetInst WHERE WidgetInstId = 19187) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19196;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 19144) END FROM WidgetInst WHERE WidgetInstId = 19144) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19185) END FROM WidgetInst WHERE WidgetInstId = 19185)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19197;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 19187) END FROM WidgetInst WHERE WidgetInstId = 19187) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19200;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 19187) END FROM WidgetInst WHERE WidgetInstId = 19187) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19201;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19203) END FROM WidgetInst WHERE WidgetInstId = 19203) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19204;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 19187) END FROM WidgetInst WHERE WidgetInstId = 19187) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19206;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 19187) END FROM WidgetInst WHERE WidgetInstId = 19187) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19207;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 19203) END FROM WidgetInst WHERE WidgetInstId = 19203) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19208;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 19187) END FROM WidgetInst WHERE WidgetInstId = 19187) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19210;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 19187) END FROM WidgetInst WHERE WidgetInstId = 19187) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19211;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 19144) END FROM WidgetInst WHERE WidgetInstId = 19144) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19212;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 19144) END FROM WidgetInst WHERE WidgetInstId = 19144) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19215;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19248) END FROM WidgetInst WHERE WidgetInstId = 19248) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19249;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19248) END FROM WidgetInst WHERE WidgetInstId = 19248) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19251;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19248) END FROM WidgetInst WHERE WidgetInstId = 19248) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19253;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 19144) END FROM WidgetInst WHERE WidgetInstId = 19144) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19255;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19264) END FROM WidgetInst WHERE WidgetInstId = 19264) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19265;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19264) END FROM WidgetInst WHERE WidgetInstId = 19264) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19267;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19264) END FROM WidgetInst WHERE WidgetInstId = 19264) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19269;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 19144) END FROM WidgetInst WHERE WidgetInstId = 19144) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19271;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19284) END FROM WidgetInst WHERE WidgetInstId = 19284) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19285;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19284) END FROM WidgetInst WHERE WidgetInstId = 19284) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19287;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19284) END FROM WidgetInst WHERE WidgetInstId = 19284) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19289;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 19144) END FROM WidgetInst WHERE WidgetInstId = 19144) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19291;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19304) END FROM WidgetInst WHERE WidgetInstId = 19304) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19305;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19304) END FROM WidgetInst WHERE WidgetInstId = 19304) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19307;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19304) END FROM WidgetInst WHERE WidgetInstId = 19304) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19309;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19310) END FROM WidgetInst WHERE WidgetInstId = 19310) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19304) END FROM WidgetInst WHERE WidgetInstId = 19304)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19311;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19310) END FROM WidgetInst WHERE WidgetInstId = 19310) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19304) END FROM WidgetInst WHERE WidgetInstId = 19304)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19313;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19310) END FROM WidgetInst WHERE WidgetInstId = 19310) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19304) END FROM WidgetInst WHERE WidgetInstId = 19304)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19315;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 19144) END FROM WidgetInst WHERE WidgetInstId = 19144) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19317;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 19319) END FROM WidgetInst WHERE WidgetInstId = 19319) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19320;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19319) END FROM WidgetInst WHERE WidgetInstId = 19319) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19323;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 19319) END FROM WidgetInst WHERE WidgetInstId = 19319) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19326;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 19319) END FROM WidgetInst WHERE WidgetInstId = 19319) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19337;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 19144) END FROM WidgetInst WHERE WidgetInstId = 19144) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19340;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 19343) END FROM WidgetInst WHERE WidgetInstId = 19343) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19344;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19343) END FROM WidgetInst WHERE WidgetInstId = 19343) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19347;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 19343) END FROM WidgetInst WHERE WidgetInstId = 19343) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19350;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 19343) END FROM WidgetInst WHERE WidgetInstId = 19343) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19361;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 19365) END FROM WidgetInst WHERE WidgetInstId = 19365) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19366;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19365) END FROM WidgetInst WHERE WidgetInstId = 19365) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19368;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19365) END FROM WidgetInst WHERE WidgetInstId = 19365) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19370;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19365) END FROM WidgetInst WHERE WidgetInstId = 19365) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19372;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19365) END FROM WidgetInst WHERE WidgetInstId = 19365) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19374;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19365) END FROM WidgetInst WHERE WidgetInstId = 19365) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19376;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 19144) END FROM WidgetInst WHERE WidgetInstId = 19144) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 18520) END FROM WidgetInst WHERE WidgetInstId = 18520)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19378;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 19380) END FROM WidgetInst WHERE WidgetInstId = 19380) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19381;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 19385;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 19385;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 19385;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 19385;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 19385;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 19385;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 19385) END FROM WidgetInst WHERE WidgetInstId = 19385) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19386;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 19388) END FROM WidgetInst WHERE WidgetInstId = 19388) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19389;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 19385) END FROM WidgetInst WHERE WidgetInstId = 19385) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19391;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19397;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19400;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 19385) END FROM WidgetInst WHERE WidgetInstId = 19385) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19403;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 19405) END FROM WidgetInst WHERE WidgetInstId = 19405) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19406;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19405) END FROM WidgetInst WHERE WidgetInstId = 19405) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19409;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 19385) END FROM WidgetInst WHERE WidgetInstId = 19385) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19412;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 19414) END FROM WidgetInst WHERE WidgetInstId = 19414) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19415;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19414) END FROM WidgetInst WHERE WidgetInstId = 19414) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19418;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 19414) END FROM WidgetInst WHERE WidgetInstId = 19414) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19421;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 19385) END FROM WidgetInst WHERE WidgetInstId = 19385) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19424;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 19385) END FROM WidgetInst WHERE WidgetInstId = 19385) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 19426) END FROM WidgetInst WHERE WidgetInstId = 19426)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19429;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 19428) END FROM WidgetInst WHERE WidgetInstId = 19428) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19432;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 19428) END FROM WidgetInst WHERE WidgetInstId = 19428) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19433;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 19428) END FROM WidgetInst WHERE WidgetInstId = 19428) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19436;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 19428) END FROM WidgetInst WHERE WidgetInstId = 19428) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19437;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 19385) END FROM WidgetInst WHERE WidgetInstId = 19385) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19426) END FROM WidgetInst WHERE WidgetInstId = 19426)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19438;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 19428) END FROM WidgetInst WHERE WidgetInstId = 19428) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19441;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 19428) END FROM WidgetInst WHERE WidgetInstId = 19428) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19442;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19444) END FROM WidgetInst WHERE WidgetInstId = 19444) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19445;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 19428) END FROM WidgetInst WHERE WidgetInstId = 19428) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19447;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 19428) END FROM WidgetInst WHERE WidgetInstId = 19428) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19448;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 19444) END FROM WidgetInst WHERE WidgetInstId = 19444) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19449;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 19428) END FROM WidgetInst WHERE WidgetInstId = 19428) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19451;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 19428) END FROM WidgetInst WHERE WidgetInstId = 19428) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19452;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 19385) END FROM WidgetInst WHERE WidgetInstId = 19385) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19453;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 19385) END FROM WidgetInst WHERE WidgetInstId = 19385) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19456;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19489) END FROM WidgetInst WHERE WidgetInstId = 19489) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19490;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19489) END FROM WidgetInst WHERE WidgetInstId = 19489) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19492;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19489) END FROM WidgetInst WHERE WidgetInstId = 19489) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19494;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 19385) END FROM WidgetInst WHERE WidgetInstId = 19385) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19496;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19505) END FROM WidgetInst WHERE WidgetInstId = 19505) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19506;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19505) END FROM WidgetInst WHERE WidgetInstId = 19505) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19508;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19505) END FROM WidgetInst WHERE WidgetInstId = 19505) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19510;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 19385) END FROM WidgetInst WHERE WidgetInstId = 19385) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19512;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19525) END FROM WidgetInst WHERE WidgetInstId = 19525) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19526;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19525) END FROM WidgetInst WHERE WidgetInstId = 19525) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19528;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19525) END FROM WidgetInst WHERE WidgetInstId = 19525) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19530;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 19385) END FROM WidgetInst WHERE WidgetInstId = 19385) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19532;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19545) END FROM WidgetInst WHERE WidgetInstId = 19545) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19546;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19545) END FROM WidgetInst WHERE WidgetInstId = 19545) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19548;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19545) END FROM WidgetInst WHERE WidgetInstId = 19545) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19550;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19551) END FROM WidgetInst WHERE WidgetInstId = 19551) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19545) END FROM WidgetInst WHERE WidgetInstId = 19545)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19552;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19551) END FROM WidgetInst WHERE WidgetInstId = 19551) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19545) END FROM WidgetInst WHERE WidgetInstId = 19545)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19554;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19551) END FROM WidgetInst WHERE WidgetInstId = 19551) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19545) END FROM WidgetInst WHERE WidgetInstId = 19545)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19556;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 19385) END FROM WidgetInst WHERE WidgetInstId = 19385) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19558;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 19560) END FROM WidgetInst WHERE WidgetInstId = 19560) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19561;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19560) END FROM WidgetInst WHERE WidgetInstId = 19560) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19564;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 19560) END FROM WidgetInst WHERE WidgetInstId = 19560) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19567;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 19560) END FROM WidgetInst WHERE WidgetInstId = 19560) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19578;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 19385) END FROM WidgetInst WHERE WidgetInstId = 19385) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19581;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 19584) END FROM WidgetInst WHERE WidgetInstId = 19584) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19585;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19584) END FROM WidgetInst WHERE WidgetInstId = 19584) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19588;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 19584) END FROM WidgetInst WHERE WidgetInstId = 19584) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19591;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 19584) END FROM WidgetInst WHERE WidgetInstId = 19584) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19602;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 19606) END FROM WidgetInst WHERE WidgetInstId = 19606) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19607;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19606) END FROM WidgetInst WHERE WidgetInstId = 19606) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19609;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19606) END FROM WidgetInst WHERE WidgetInstId = 19606) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19611;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19606) END FROM WidgetInst WHERE WidgetInstId = 19606) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19613;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19606) END FROM WidgetInst WHERE WidgetInstId = 19606) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19615;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19606) END FROM WidgetInst WHERE WidgetInstId = 19606) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19617;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 19385) END FROM WidgetInst WHERE WidgetInstId = 19385) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 18520) END FROM WidgetInst WHERE WidgetInstId = 18520)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19619;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 19621) END FROM WidgetInst WHERE WidgetInstId = 19621) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19622;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 19626;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 19626;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 19626;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 19626;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 19626;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 19626;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 19626) END FROM WidgetInst WHERE WidgetInstId = 19626) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19627;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 19629) END FROM WidgetInst WHERE WidgetInstId = 19629) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19630;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 19626) END FROM WidgetInst WHERE WidgetInstId = 19626) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19632;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19638;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19641;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 19626) END FROM WidgetInst WHERE WidgetInstId = 19626) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19644;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 19646) END FROM WidgetInst WHERE WidgetInstId = 19646) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19647;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19646) END FROM WidgetInst WHERE WidgetInstId = 19646) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19650;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 19626) END FROM WidgetInst WHERE WidgetInstId = 19626) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19653;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 19655) END FROM WidgetInst WHERE WidgetInstId = 19655) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19656;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19655) END FROM WidgetInst WHERE WidgetInstId = 19655) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19659;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 19655) END FROM WidgetInst WHERE WidgetInstId = 19655) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19662;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 19626) END FROM WidgetInst WHERE WidgetInstId = 19626) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19665;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 19626) END FROM WidgetInst WHERE WidgetInstId = 19626) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 19667) END FROM WidgetInst WHERE WidgetInstId = 19667)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19670;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 19669) END FROM WidgetInst WHERE WidgetInstId = 19669) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19673;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 19669) END FROM WidgetInst WHERE WidgetInstId = 19669) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19674;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 19669) END FROM WidgetInst WHERE WidgetInstId = 19669) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19677;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 19669) END FROM WidgetInst WHERE WidgetInstId = 19669) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19678;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 19626) END FROM WidgetInst WHERE WidgetInstId = 19626) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19667) END FROM WidgetInst WHERE WidgetInstId = 19667)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19679;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 19669) END FROM WidgetInst WHERE WidgetInstId = 19669) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19682;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 19669) END FROM WidgetInst WHERE WidgetInstId = 19669) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19683;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19685) END FROM WidgetInst WHERE WidgetInstId = 19685) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19686;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 19669) END FROM WidgetInst WHERE WidgetInstId = 19669) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19688;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 19669) END FROM WidgetInst WHERE WidgetInstId = 19669) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19689;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 19685) END FROM WidgetInst WHERE WidgetInstId = 19685) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19690;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 19669) END FROM WidgetInst WHERE WidgetInstId = 19669) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19692;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 19669) END FROM WidgetInst WHERE WidgetInstId = 19669) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19693;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 19626) END FROM WidgetInst WHERE WidgetInstId = 19626) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19694;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 19626) END FROM WidgetInst WHERE WidgetInstId = 19626) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19697;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19730) END FROM WidgetInst WHERE WidgetInstId = 19730) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19731;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19730) END FROM WidgetInst WHERE WidgetInstId = 19730) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19733;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19730) END FROM WidgetInst WHERE WidgetInstId = 19730) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19735;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 19626) END FROM WidgetInst WHERE WidgetInstId = 19626) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19737;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19746) END FROM WidgetInst WHERE WidgetInstId = 19746) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19747;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19746) END FROM WidgetInst WHERE WidgetInstId = 19746) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19749;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19746) END FROM WidgetInst WHERE WidgetInstId = 19746) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19751;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 19626) END FROM WidgetInst WHERE WidgetInstId = 19626) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19753;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19766) END FROM WidgetInst WHERE WidgetInstId = 19766) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19767;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19766) END FROM WidgetInst WHERE WidgetInstId = 19766) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19769;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19766) END FROM WidgetInst WHERE WidgetInstId = 19766) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19771;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 19626) END FROM WidgetInst WHERE WidgetInstId = 19626) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19773;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19786) END FROM WidgetInst WHERE WidgetInstId = 19786) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19787;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19786) END FROM WidgetInst WHERE WidgetInstId = 19786) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19789;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19786) END FROM WidgetInst WHERE WidgetInstId = 19786) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19791;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19792) END FROM WidgetInst WHERE WidgetInstId = 19792) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19786) END FROM WidgetInst WHERE WidgetInstId = 19786)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19793;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19792) END FROM WidgetInst WHERE WidgetInstId = 19792) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19786) END FROM WidgetInst WHERE WidgetInstId = 19786)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19795;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19792) END FROM WidgetInst WHERE WidgetInstId = 19792) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19786) END FROM WidgetInst WHERE WidgetInstId = 19786)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19797;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 19626) END FROM WidgetInst WHERE WidgetInstId = 19626) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19799;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 19801) END FROM WidgetInst WHERE WidgetInstId = 19801) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19802;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19801) END FROM WidgetInst WHERE WidgetInstId = 19801) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19805;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 19801) END FROM WidgetInst WHERE WidgetInstId = 19801) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19808;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 19801) END FROM WidgetInst WHERE WidgetInstId = 19801) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19819;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 19626) END FROM WidgetInst WHERE WidgetInstId = 19626) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19822;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 19825) END FROM WidgetInst WHERE WidgetInstId = 19825) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19826;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19825) END FROM WidgetInst WHERE WidgetInstId = 19825) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19829;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 19825) END FROM WidgetInst WHERE WidgetInstId = 19825) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19832;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 19825) END FROM WidgetInst WHERE WidgetInstId = 19825) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19843;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 19847) END FROM WidgetInst WHERE WidgetInstId = 19847) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19848;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19847) END FROM WidgetInst WHERE WidgetInstId = 19847) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19850;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19847) END FROM WidgetInst WHERE WidgetInstId = 19847) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19852;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19847) END FROM WidgetInst WHERE WidgetInstId = 19847) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19854;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19847) END FROM WidgetInst WHERE WidgetInstId = 19847) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19856;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19847) END FROM WidgetInst WHERE WidgetInstId = 19847) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19858;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 19626) END FROM WidgetInst WHERE WidgetInstId = 19626) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 18520) END FROM WidgetInst WHERE WidgetInstId = 18520)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19860;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 19862) END FROM WidgetInst WHERE WidgetInstId = 19862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19863;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 19867;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 19867;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 19867;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 19867;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 19867;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 19867;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 19867) END FROM WidgetInst WHERE WidgetInstId = 19867) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19868;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 19870) END FROM WidgetInst WHERE WidgetInstId = 19870) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19871;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 19867) END FROM WidgetInst WHERE WidgetInstId = 19867) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19873;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19879;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19882;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 19867) END FROM WidgetInst WHERE WidgetInstId = 19867) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19885;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 19887) END FROM WidgetInst WHERE WidgetInstId = 19887) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19888;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19887) END FROM WidgetInst WHERE WidgetInstId = 19887) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19891;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 19867) END FROM WidgetInst WHERE WidgetInstId = 19867) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19894;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 19896) END FROM WidgetInst WHERE WidgetInstId = 19896) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19897;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19896) END FROM WidgetInst WHERE WidgetInstId = 19896) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19900;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 19896) END FROM WidgetInst WHERE WidgetInstId = 19896) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19903;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 19867) END FROM WidgetInst WHERE WidgetInstId = 19867) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19906;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 19867) END FROM WidgetInst WHERE WidgetInstId = 19867) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 19908) END FROM WidgetInst WHERE WidgetInstId = 19908)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19911;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 19910) END FROM WidgetInst WHERE WidgetInstId = 19910) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19914;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 19910) END FROM WidgetInst WHERE WidgetInstId = 19910) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19915;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 19910) END FROM WidgetInst WHERE WidgetInstId = 19910) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19918;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 19910) END FROM WidgetInst WHERE WidgetInstId = 19910) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19919;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 19867) END FROM WidgetInst WHERE WidgetInstId = 19867) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19908) END FROM WidgetInst WHERE WidgetInstId = 19908)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19920;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 19910) END FROM WidgetInst WHERE WidgetInstId = 19910) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19923;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 19910) END FROM WidgetInst WHERE WidgetInstId = 19910) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19924;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19926) END FROM WidgetInst WHERE WidgetInstId = 19926) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19927;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 19910) END FROM WidgetInst WHERE WidgetInstId = 19910) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19929;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 19910) END FROM WidgetInst WHERE WidgetInstId = 19910) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19930;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 19926) END FROM WidgetInst WHERE WidgetInstId = 19926) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19931;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 19910) END FROM WidgetInst WHERE WidgetInstId = 19910) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19933;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 19910) END FROM WidgetInst WHERE WidgetInstId = 19910) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19934;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 19867) END FROM WidgetInst WHERE WidgetInstId = 19867) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19935;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 19867) END FROM WidgetInst WHERE WidgetInstId = 19867) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19938;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19971) END FROM WidgetInst WHERE WidgetInstId = 19971) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19972;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19971) END FROM WidgetInst WHERE WidgetInstId = 19971) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19974;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19971) END FROM WidgetInst WHERE WidgetInstId = 19971) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19976;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 19867) END FROM WidgetInst WHERE WidgetInstId = 19867) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19978;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19987) END FROM WidgetInst WHERE WidgetInstId = 19987) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19988;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19987) END FROM WidgetInst WHERE WidgetInstId = 19987) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19990;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19987) END FROM WidgetInst WHERE WidgetInstId = 19987) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19992;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 19867) END FROM WidgetInst WHERE WidgetInstId = 19867) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19994;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20007) END FROM WidgetInst WHERE WidgetInstId = 20007) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20008;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20007) END FROM WidgetInst WHERE WidgetInstId = 20007) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20010;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20007) END FROM WidgetInst WHERE WidgetInstId = 20007) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20012;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 19867) END FROM WidgetInst WHERE WidgetInstId = 19867) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20014;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20027) END FROM WidgetInst WHERE WidgetInstId = 20027) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20028;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20027) END FROM WidgetInst WHERE WidgetInstId = 20027) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20030;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20027) END FROM WidgetInst WHERE WidgetInstId = 20027) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20032;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20033) END FROM WidgetInst WHERE WidgetInstId = 20033) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20027) END FROM WidgetInst WHERE WidgetInstId = 20027)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20034;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20033) END FROM WidgetInst WHERE WidgetInstId = 20033) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20027) END FROM WidgetInst WHERE WidgetInstId = 20027)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20036;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20033) END FROM WidgetInst WHERE WidgetInstId = 20033) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20027) END FROM WidgetInst WHERE WidgetInstId = 20027)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20038;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 19867) END FROM WidgetInst WHERE WidgetInstId = 19867) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20040;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 20042) END FROM WidgetInst WHERE WidgetInstId = 20042) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20043;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20042) END FROM WidgetInst WHERE WidgetInstId = 20042) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20046;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 20042) END FROM WidgetInst WHERE WidgetInstId = 20042) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20049;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 20042) END FROM WidgetInst WHERE WidgetInstId = 20042) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20060;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 19867) END FROM WidgetInst WHERE WidgetInstId = 19867) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20063;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 20066) END FROM WidgetInst WHERE WidgetInstId = 20066) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20067;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20066) END FROM WidgetInst WHERE WidgetInstId = 20066) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20070;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 20066) END FROM WidgetInst WHERE WidgetInstId = 20066) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20073;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 20066) END FROM WidgetInst WHERE WidgetInstId = 20066) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20084;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 20088) END FROM WidgetInst WHERE WidgetInstId = 20088) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20089;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 20088) END FROM WidgetInst WHERE WidgetInstId = 20088) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20091;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 20088) END FROM WidgetInst WHERE WidgetInstId = 20088) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20093;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 20088) END FROM WidgetInst WHERE WidgetInstId = 20088) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20095;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 20088) END FROM WidgetInst WHERE WidgetInstId = 20088) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20097;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 20088) END FROM WidgetInst WHERE WidgetInstId = 20088) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20099;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 19867) END FROM WidgetInst WHERE WidgetInstId = 19867) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 18520) END FROM WidgetInst WHERE WidgetInstId = 18520)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20101;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 20103) END FROM WidgetInst WHERE WidgetInstId = 20103) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20104;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 20108;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 20108;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 20108;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 20108;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 20108;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 20108;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 20108) END FROM WidgetInst WHERE WidgetInstId = 20108) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20109;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 20111) END FROM WidgetInst WHERE WidgetInstId = 20111) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20112;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 20108) END FROM WidgetInst WHERE WidgetInstId = 20108) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20114;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20120;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20123;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 20108) END FROM WidgetInst WHERE WidgetInstId = 20108) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20126;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 20128) END FROM WidgetInst WHERE WidgetInstId = 20128) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20129;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20128) END FROM WidgetInst WHERE WidgetInstId = 20128) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20132;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 20108) END FROM WidgetInst WHERE WidgetInstId = 20108) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20135;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 20137) END FROM WidgetInst WHERE WidgetInstId = 20137) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20138;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20137) END FROM WidgetInst WHERE WidgetInstId = 20137) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20141;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 20137) END FROM WidgetInst WHERE WidgetInstId = 20137) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20144;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 20108) END FROM WidgetInst WHERE WidgetInstId = 20108) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20147;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 20108) END FROM WidgetInst WHERE WidgetInstId = 20108) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 20149) END FROM WidgetInst WHERE WidgetInstId = 20149)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20152;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 20151) END FROM WidgetInst WHERE WidgetInstId = 20151) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20155;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 20151) END FROM WidgetInst WHERE WidgetInstId = 20151) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20156;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 20151) END FROM WidgetInst WHERE WidgetInstId = 20151) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20159;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 20151) END FROM WidgetInst WHERE WidgetInstId = 20151) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20160;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 20108) END FROM WidgetInst WHERE WidgetInstId = 20108) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20149) END FROM WidgetInst WHERE WidgetInstId = 20149)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20161;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 20151) END FROM WidgetInst WHERE WidgetInstId = 20151) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20164;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 20151) END FROM WidgetInst WHERE WidgetInstId = 20151) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20165;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20167) END FROM WidgetInst WHERE WidgetInstId = 20167) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20168;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 20151) END FROM WidgetInst WHERE WidgetInstId = 20151) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20170;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 20151) END FROM WidgetInst WHERE WidgetInstId = 20151) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20171;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 20167) END FROM WidgetInst WHERE WidgetInstId = 20167) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20172;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 20151) END FROM WidgetInst WHERE WidgetInstId = 20151) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20174;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 20151) END FROM WidgetInst WHERE WidgetInstId = 20151) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20175;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 20108) END FROM WidgetInst WHERE WidgetInstId = 20108) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20176;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 20108) END FROM WidgetInst WHERE WidgetInstId = 20108) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20179;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20212) END FROM WidgetInst WHERE WidgetInstId = 20212) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20213;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20212) END FROM WidgetInst WHERE WidgetInstId = 20212) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20215;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20212) END FROM WidgetInst WHERE WidgetInstId = 20212) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20217;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 20108) END FROM WidgetInst WHERE WidgetInstId = 20108) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20219;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20228) END FROM WidgetInst WHERE WidgetInstId = 20228) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20229;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20228) END FROM WidgetInst WHERE WidgetInstId = 20228) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20231;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20228) END FROM WidgetInst WHERE WidgetInstId = 20228) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20233;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 20108) END FROM WidgetInst WHERE WidgetInstId = 20108) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20235;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20248) END FROM WidgetInst WHERE WidgetInstId = 20248) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20249;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20248) END FROM WidgetInst WHERE WidgetInstId = 20248) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20251;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20248) END FROM WidgetInst WHERE WidgetInstId = 20248) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20253;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 20108) END FROM WidgetInst WHERE WidgetInstId = 20108) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20255;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20268) END FROM WidgetInst WHERE WidgetInstId = 20268) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20269;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20268) END FROM WidgetInst WHERE WidgetInstId = 20268) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20271;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20268) END FROM WidgetInst WHERE WidgetInstId = 20268) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20273;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20274) END FROM WidgetInst WHERE WidgetInstId = 20274) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20268) END FROM WidgetInst WHERE WidgetInstId = 20268)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20275;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20274) END FROM WidgetInst WHERE WidgetInstId = 20274) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20268) END FROM WidgetInst WHERE WidgetInstId = 20268)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20277;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20274) END FROM WidgetInst WHERE WidgetInstId = 20274) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20268) END FROM WidgetInst WHERE WidgetInstId = 20268)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20279;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 20108) END FROM WidgetInst WHERE WidgetInstId = 20108) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20281;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 20283) END FROM WidgetInst WHERE WidgetInstId = 20283) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20284;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20283) END FROM WidgetInst WHERE WidgetInstId = 20283) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20287;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 20283) END FROM WidgetInst WHERE WidgetInstId = 20283) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20290;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 20283) END FROM WidgetInst WHERE WidgetInstId = 20283) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20301;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 20108) END FROM WidgetInst WHERE WidgetInstId = 20108) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20304;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 20307) END FROM WidgetInst WHERE WidgetInstId = 20307) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20308;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20307) END FROM WidgetInst WHERE WidgetInstId = 20307) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20311;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 20307) END FROM WidgetInst WHERE WidgetInstId = 20307) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20314;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 20307) END FROM WidgetInst WHERE WidgetInstId = 20307) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20325;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 20329) END FROM WidgetInst WHERE WidgetInstId = 20329) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20330;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 20329) END FROM WidgetInst WHERE WidgetInstId = 20329) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20332;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 20329) END FROM WidgetInst WHERE WidgetInstId = 20329) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20334;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 20329) END FROM WidgetInst WHERE WidgetInstId = 20329) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20336;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 20329) END FROM WidgetInst WHERE WidgetInstId = 20329) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20338;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 20329) END FROM WidgetInst WHERE WidgetInstId = 20329) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20340;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 20108) END FROM WidgetInst WHERE WidgetInstId = 20108) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 18520) END FROM WidgetInst WHERE WidgetInstId = 18520)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20342;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 20344) END FROM WidgetInst WHERE WidgetInstId = 20344) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20345;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 20349;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 20349;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 20349;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 20349;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 20349;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 20349;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 20349) END FROM WidgetInst WHERE WidgetInstId = 20349) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20350;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 20352) END FROM WidgetInst WHERE WidgetInstId = 20352) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20353;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 20349) END FROM WidgetInst WHERE WidgetInstId = 20349) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20355;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20361;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20364;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 20349) END FROM WidgetInst WHERE WidgetInstId = 20349) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20367;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 20369) END FROM WidgetInst WHERE WidgetInstId = 20369) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20370;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20369) END FROM WidgetInst WHERE WidgetInstId = 20369) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20373;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 20349) END FROM WidgetInst WHERE WidgetInstId = 20349) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20376;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 20378) END FROM WidgetInst WHERE WidgetInstId = 20378) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20379;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20378) END FROM WidgetInst WHERE WidgetInstId = 20378) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20382;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 20378) END FROM WidgetInst WHERE WidgetInstId = 20378) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20385;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 20349) END FROM WidgetInst WHERE WidgetInstId = 20349) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20388;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 20349) END FROM WidgetInst WHERE WidgetInstId = 20349) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 20390) END FROM WidgetInst WHERE WidgetInstId = 20390)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20393;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 20392) END FROM WidgetInst WHERE WidgetInstId = 20392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20396;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 20392) END FROM WidgetInst WHERE WidgetInstId = 20392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20397;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 20392) END FROM WidgetInst WHERE WidgetInstId = 20392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20400;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 20392) END FROM WidgetInst WHERE WidgetInstId = 20392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20401;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 20349) END FROM WidgetInst WHERE WidgetInstId = 20349) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20390) END FROM WidgetInst WHERE WidgetInstId = 20390)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20402;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 20392) END FROM WidgetInst WHERE WidgetInstId = 20392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20405;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 20392) END FROM WidgetInst WHERE WidgetInstId = 20392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20406;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20408) END FROM WidgetInst WHERE WidgetInstId = 20408) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20409;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 20392) END FROM WidgetInst WHERE WidgetInstId = 20392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20411;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 20392) END FROM WidgetInst WHERE WidgetInstId = 20392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20412;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 20408) END FROM WidgetInst WHERE WidgetInstId = 20408) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20413;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 20392) END FROM WidgetInst WHERE WidgetInstId = 20392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20415;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 20392) END FROM WidgetInst WHERE WidgetInstId = 20392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20416;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 20349) END FROM WidgetInst WHERE WidgetInstId = 20349) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20417;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 20349) END FROM WidgetInst WHERE WidgetInstId = 20349) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20420;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20453) END FROM WidgetInst WHERE WidgetInstId = 20453) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20454;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20453) END FROM WidgetInst WHERE WidgetInstId = 20453) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20456;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20453) END FROM WidgetInst WHERE WidgetInstId = 20453) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20458;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 20349) END FROM WidgetInst WHERE WidgetInstId = 20349) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20460;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20469) END FROM WidgetInst WHERE WidgetInstId = 20469) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20470;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20469) END FROM WidgetInst WHERE WidgetInstId = 20469) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20472;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20469) END FROM WidgetInst WHERE WidgetInstId = 20469) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20474;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 20349) END FROM WidgetInst WHERE WidgetInstId = 20349) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20476;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20489) END FROM WidgetInst WHERE WidgetInstId = 20489) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20490;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20489) END FROM WidgetInst WHERE WidgetInstId = 20489) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20492;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20489) END FROM WidgetInst WHERE WidgetInstId = 20489) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20494;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 20349) END FROM WidgetInst WHERE WidgetInstId = 20349) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20496;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20509) END FROM WidgetInst WHERE WidgetInstId = 20509) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20510;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20509) END FROM WidgetInst WHERE WidgetInstId = 20509) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20512;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20509) END FROM WidgetInst WHERE WidgetInstId = 20509) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20514;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20515) END FROM WidgetInst WHERE WidgetInstId = 20515) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20509) END FROM WidgetInst WHERE WidgetInstId = 20509)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20516;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20515) END FROM WidgetInst WHERE WidgetInstId = 20515) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20509) END FROM WidgetInst WHERE WidgetInstId = 20509)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20518;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20515) END FROM WidgetInst WHERE WidgetInstId = 20515) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20509) END FROM WidgetInst WHERE WidgetInstId = 20509)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20520;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 20349) END FROM WidgetInst WHERE WidgetInstId = 20349) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20522;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 20524) END FROM WidgetInst WHERE WidgetInstId = 20524) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20525;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20524) END FROM WidgetInst WHERE WidgetInstId = 20524) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20528;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 20524) END FROM WidgetInst WHERE WidgetInstId = 20524) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20531;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 20524) END FROM WidgetInst WHERE WidgetInstId = 20524) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20542;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 20349) END FROM WidgetInst WHERE WidgetInstId = 20349) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20545;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 20548) END FROM WidgetInst WHERE WidgetInstId = 20548) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20549;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20548) END FROM WidgetInst WHERE WidgetInstId = 20548) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20552;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 20548) END FROM WidgetInst WHERE WidgetInstId = 20548) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20555;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 20548) END FROM WidgetInst WHERE WidgetInstId = 20548) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20566;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 20570) END FROM WidgetInst WHERE WidgetInstId = 20570) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20571;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 20570) END FROM WidgetInst WHERE WidgetInstId = 20570) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20573;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 20570) END FROM WidgetInst WHERE WidgetInstId = 20570) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20575;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 20570) END FROM WidgetInst WHERE WidgetInstId = 20570) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20577;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 20570) END FROM WidgetInst WHERE WidgetInstId = 20570) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20579;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 20570) END FROM WidgetInst WHERE WidgetInstId = 20570) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20581;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 20349) END FROM WidgetInst WHERE WidgetInstId = 20349) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 18520) END FROM WidgetInst WHERE WidgetInstId = 18520)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20583;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 20585) END FROM WidgetInst WHERE WidgetInstId = 20585) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20586;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 20590;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 20590;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 20590;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 20590;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 20590;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 20590;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 20590) END FROM WidgetInst WHERE WidgetInstId = 20590) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20591;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 20593) END FROM WidgetInst WHERE WidgetInstId = 20593) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20594;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 20590) END FROM WidgetInst WHERE WidgetInstId = 20590) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20596;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20602;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20605;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 20590) END FROM WidgetInst WHERE WidgetInstId = 20590) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20608;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 20610) END FROM WidgetInst WHERE WidgetInstId = 20610) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20611;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20610) END FROM WidgetInst WHERE WidgetInstId = 20610) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20614;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 20590) END FROM WidgetInst WHERE WidgetInstId = 20590) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20617;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 20619) END FROM WidgetInst WHERE WidgetInstId = 20619) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20620;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20619) END FROM WidgetInst WHERE WidgetInstId = 20619) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20623;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 20619) END FROM WidgetInst WHERE WidgetInstId = 20619) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20626;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 20590) END FROM WidgetInst WHERE WidgetInstId = 20590) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20629;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 20590) END FROM WidgetInst WHERE WidgetInstId = 20590) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 20631) END FROM WidgetInst WHERE WidgetInstId = 20631)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20634;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 20633) END FROM WidgetInst WHERE WidgetInstId = 20633) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20637;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 20633) END FROM WidgetInst WHERE WidgetInstId = 20633) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20638;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 20633) END FROM WidgetInst WHERE WidgetInstId = 20633) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20641;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 20633) END FROM WidgetInst WHERE WidgetInstId = 20633) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20642;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 20590) END FROM WidgetInst WHERE WidgetInstId = 20590) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20631) END FROM WidgetInst WHERE WidgetInstId = 20631)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20643;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 20633) END FROM WidgetInst WHERE WidgetInstId = 20633) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20646;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 20633) END FROM WidgetInst WHERE WidgetInstId = 20633) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20647;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20649) END FROM WidgetInst WHERE WidgetInstId = 20649) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20650;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 20633) END FROM WidgetInst WHERE WidgetInstId = 20633) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20652;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 20633) END FROM WidgetInst WHERE WidgetInstId = 20633) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20653;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 20649) END FROM WidgetInst WHERE WidgetInstId = 20649) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20654;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 20633) END FROM WidgetInst WHERE WidgetInstId = 20633) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20656;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 20633) END FROM WidgetInst WHERE WidgetInstId = 20633) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20657;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 20590) END FROM WidgetInst WHERE WidgetInstId = 20590) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20658;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 20590) END FROM WidgetInst WHERE WidgetInstId = 20590) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20661;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20694) END FROM WidgetInst WHERE WidgetInstId = 20694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20695;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20694) END FROM WidgetInst WHERE WidgetInstId = 20694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20697;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20694) END FROM WidgetInst WHERE WidgetInstId = 20694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20699;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 20590) END FROM WidgetInst WHERE WidgetInstId = 20590) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20701;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20710) END FROM WidgetInst WHERE WidgetInstId = 20710) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20711;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20710) END FROM WidgetInst WHERE WidgetInstId = 20710) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20713;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20710) END FROM WidgetInst WHERE WidgetInstId = 20710) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20715;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 20590) END FROM WidgetInst WHERE WidgetInstId = 20590) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20717;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20730) END FROM WidgetInst WHERE WidgetInstId = 20730) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20731;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20730) END FROM WidgetInst WHERE WidgetInstId = 20730) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20733;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20730) END FROM WidgetInst WHERE WidgetInstId = 20730) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20735;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 20590) END FROM WidgetInst WHERE WidgetInstId = 20590) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20737;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20750) END FROM WidgetInst WHERE WidgetInstId = 20750) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20751;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20750) END FROM WidgetInst WHERE WidgetInstId = 20750) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20753;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20750) END FROM WidgetInst WHERE WidgetInstId = 20750) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20755;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20756) END FROM WidgetInst WHERE WidgetInstId = 20756) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20750) END FROM WidgetInst WHERE WidgetInstId = 20750)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20757;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20756) END FROM WidgetInst WHERE WidgetInstId = 20756) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20750) END FROM WidgetInst WHERE WidgetInstId = 20750)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20759;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20756) END FROM WidgetInst WHERE WidgetInstId = 20756) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20750) END FROM WidgetInst WHERE WidgetInstId = 20750)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20761;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 20590) END FROM WidgetInst WHERE WidgetInstId = 20590) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20763;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 20765) END FROM WidgetInst WHERE WidgetInstId = 20765) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20766;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20765) END FROM WidgetInst WHERE WidgetInstId = 20765) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20769;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 20765) END FROM WidgetInst WHERE WidgetInstId = 20765) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20772;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 20765) END FROM WidgetInst WHERE WidgetInstId = 20765) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20783;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 20590) END FROM WidgetInst WHERE WidgetInstId = 20590) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20786;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 20789) END FROM WidgetInst WHERE WidgetInstId = 20789) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20790;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20789) END FROM WidgetInst WHERE WidgetInstId = 20789) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20793;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 20789) END FROM WidgetInst WHERE WidgetInstId = 20789) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20796;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 20789) END FROM WidgetInst WHERE WidgetInstId = 20789) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20807;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 20811) END FROM WidgetInst WHERE WidgetInstId = 20811) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20812;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 20811) END FROM WidgetInst WHERE WidgetInstId = 20811) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20814;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 20811) END FROM WidgetInst WHERE WidgetInstId = 20811) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20816;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 20811) END FROM WidgetInst WHERE WidgetInstId = 20811) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20818;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 20811) END FROM WidgetInst WHERE WidgetInstId = 20811) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20820;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 20811) END FROM WidgetInst WHERE WidgetInstId = 20811) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20822;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 20590) END FROM WidgetInst WHERE WidgetInstId = 20590) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 18520) END FROM WidgetInst WHERE WidgetInstId = 18520)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20824;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 20826) END FROM WidgetInst WHERE WidgetInstId = 20826) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20827;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 20831;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 20831;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 20831;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 20831;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 20831;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 20831;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 20831) END FROM WidgetInst WHERE WidgetInstId = 20831) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20832;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 20834) END FROM WidgetInst WHERE WidgetInstId = 20834) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20835;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 20831) END FROM WidgetInst WHERE WidgetInstId = 20831) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20837;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20843;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20846;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 20831) END FROM WidgetInst WHERE WidgetInstId = 20831) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20849;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 20851) END FROM WidgetInst WHERE WidgetInstId = 20851) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20852;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20851) END FROM WidgetInst WHERE WidgetInstId = 20851) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20855;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 20831) END FROM WidgetInst WHERE WidgetInstId = 20831) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20858;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 20860) END FROM WidgetInst WHERE WidgetInstId = 20860) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20861;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20860) END FROM WidgetInst WHERE WidgetInstId = 20860) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20864;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 20860) END FROM WidgetInst WHERE WidgetInstId = 20860) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20867;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 20831) END FROM WidgetInst WHERE WidgetInstId = 20831) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20870;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 20831) END FROM WidgetInst WHERE WidgetInstId = 20831) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 20872) END FROM WidgetInst WHERE WidgetInstId = 20872)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20875;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 20874) END FROM WidgetInst WHERE WidgetInstId = 20874) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20878;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 20874) END FROM WidgetInst WHERE WidgetInstId = 20874) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20879;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 20874) END FROM WidgetInst WHERE WidgetInstId = 20874) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20882;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 20874) END FROM WidgetInst WHERE WidgetInstId = 20874) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20883;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 20831) END FROM WidgetInst WHERE WidgetInstId = 20831) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20872) END FROM WidgetInst WHERE WidgetInstId = 20872)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20884;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 20874) END FROM WidgetInst WHERE WidgetInstId = 20874) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20887;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 20874) END FROM WidgetInst WHERE WidgetInstId = 20874) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20888;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20890) END FROM WidgetInst WHERE WidgetInstId = 20890) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20891;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 20874) END FROM WidgetInst WHERE WidgetInstId = 20874) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20893;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 20874) END FROM WidgetInst WHERE WidgetInstId = 20874) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20894;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 20890) END FROM WidgetInst WHERE WidgetInstId = 20890) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20895;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 20874) END FROM WidgetInst WHERE WidgetInstId = 20874) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20897;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 20874) END FROM WidgetInst WHERE WidgetInstId = 20874) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20898;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 20831) END FROM WidgetInst WHERE WidgetInstId = 20831) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20899;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 20831) END FROM WidgetInst WHERE WidgetInstId = 20831) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20902;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20935) END FROM WidgetInst WHERE WidgetInstId = 20935) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20936;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20935) END FROM WidgetInst WHERE WidgetInstId = 20935) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20938;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20935) END FROM WidgetInst WHERE WidgetInstId = 20935) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20940;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 20831) END FROM WidgetInst WHERE WidgetInstId = 20831) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20942;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20951) END FROM WidgetInst WHERE WidgetInstId = 20951) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20952;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20951) END FROM WidgetInst WHERE WidgetInstId = 20951) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20954;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20951) END FROM WidgetInst WHERE WidgetInstId = 20951) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20956;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 20831) END FROM WidgetInst WHERE WidgetInstId = 20831) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20958;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20971) END FROM WidgetInst WHERE WidgetInstId = 20971) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20972;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20971) END FROM WidgetInst WHERE WidgetInstId = 20971) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20974;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20971) END FROM WidgetInst WHERE WidgetInstId = 20971) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20976;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 20831) END FROM WidgetInst WHERE WidgetInstId = 20831) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20978;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20991) END FROM WidgetInst WHERE WidgetInstId = 20991) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20992;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20991) END FROM WidgetInst WHERE WidgetInstId = 20991) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20994;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20991) END FROM WidgetInst WHERE WidgetInstId = 20991) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20996;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20997) END FROM WidgetInst WHERE WidgetInstId = 20997) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20991) END FROM WidgetInst WHERE WidgetInstId = 20991)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20998;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20997) END FROM WidgetInst WHERE WidgetInstId = 20997) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20991) END FROM WidgetInst WHERE WidgetInstId = 20991)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21000;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20997) END FROM WidgetInst WHERE WidgetInstId = 20997) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20991) END FROM WidgetInst WHERE WidgetInstId = 20991)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21002;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 20831) END FROM WidgetInst WHERE WidgetInstId = 20831) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21004;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21006) END FROM WidgetInst WHERE WidgetInstId = 21006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21007;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21006) END FROM WidgetInst WHERE WidgetInstId = 21006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21010;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 21006) END FROM WidgetInst WHERE WidgetInstId = 21006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21013;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 21006) END FROM WidgetInst WHERE WidgetInstId = 21006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21024;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 20831) END FROM WidgetInst WHERE WidgetInstId = 20831) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21027;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21030) END FROM WidgetInst WHERE WidgetInstId = 21030) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21031;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21030) END FROM WidgetInst WHERE WidgetInstId = 21030) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21034;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 21030) END FROM WidgetInst WHERE WidgetInstId = 21030) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21037;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 21030) END FROM WidgetInst WHERE WidgetInstId = 21030) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21048;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 21052) END FROM WidgetInst WHERE WidgetInstId = 21052) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21053;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 21052) END FROM WidgetInst WHERE WidgetInstId = 21052) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21055;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 21052) END FROM WidgetInst WHERE WidgetInstId = 21052) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21057;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 21052) END FROM WidgetInst WHERE WidgetInstId = 21052) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21059;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 21052) END FROM WidgetInst WHERE WidgetInstId = 21052) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21061;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 21052) END FROM WidgetInst WHERE WidgetInstId = 21052) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21063;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 20831) END FROM WidgetInst WHERE WidgetInstId = 20831) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 18520) END FROM WidgetInst WHERE WidgetInstId = 18520)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21065;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 21067) END FROM WidgetInst WHERE WidgetInstId = 21067) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21068;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 21072;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 21072;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 21072;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 21072;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 21072;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 21072;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 21072) END FROM WidgetInst WHERE WidgetInstId = 21072) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21073;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 21075) END FROM WidgetInst WHERE WidgetInstId = 21075) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21076;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 21072) END FROM WidgetInst WHERE WidgetInstId = 21072) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21078;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21084;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21087;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 21072) END FROM WidgetInst WHERE WidgetInstId = 21072) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21090;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21092) END FROM WidgetInst WHERE WidgetInstId = 21092) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21093;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21092) END FROM WidgetInst WHERE WidgetInstId = 21092) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21096;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 21072) END FROM WidgetInst WHERE WidgetInstId = 21072) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21099;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21101) END FROM WidgetInst WHERE WidgetInstId = 21101) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21102;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21101) END FROM WidgetInst WHERE WidgetInstId = 21101) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21105;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 21101) END FROM WidgetInst WHERE WidgetInstId = 21101) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21108;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 21072) END FROM WidgetInst WHERE WidgetInstId = 21072) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21111;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 21072) END FROM WidgetInst WHERE WidgetInstId = 21072) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21113) END FROM WidgetInst WHERE WidgetInstId = 21113)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21116;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21115) END FROM WidgetInst WHERE WidgetInstId = 21115) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21119;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21115) END FROM WidgetInst WHERE WidgetInstId = 21115) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21120;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21115) END FROM WidgetInst WHERE WidgetInstId = 21115) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21123;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21115) END FROM WidgetInst WHERE WidgetInstId = 21115) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21124;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 21072) END FROM WidgetInst WHERE WidgetInstId = 21072) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21113) END FROM WidgetInst WHERE WidgetInstId = 21113)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21125;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21115) END FROM WidgetInst WHERE WidgetInstId = 21115) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21128;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21115) END FROM WidgetInst WHERE WidgetInstId = 21115) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21129;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21131) END FROM WidgetInst WHERE WidgetInstId = 21131) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21132;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21115) END FROM WidgetInst WHERE WidgetInstId = 21115) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21134;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21115) END FROM WidgetInst WHERE WidgetInstId = 21115) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21135;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 21131) END FROM WidgetInst WHERE WidgetInstId = 21131) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21136;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21115) END FROM WidgetInst WHERE WidgetInstId = 21115) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21138;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21115) END FROM WidgetInst WHERE WidgetInstId = 21115) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21139;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 21072) END FROM WidgetInst WHERE WidgetInstId = 21072) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21140;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 21072) END FROM WidgetInst WHERE WidgetInstId = 21072) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21143;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21176) END FROM WidgetInst WHERE WidgetInstId = 21176) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21177;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21176) END FROM WidgetInst WHERE WidgetInstId = 21176) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21179;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21176) END FROM WidgetInst WHERE WidgetInstId = 21176) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21181;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 21072) END FROM WidgetInst WHERE WidgetInstId = 21072) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21183;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21192) END FROM WidgetInst WHERE WidgetInstId = 21192) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21193;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21192) END FROM WidgetInst WHERE WidgetInstId = 21192) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21195;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21192) END FROM WidgetInst WHERE WidgetInstId = 21192) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21197;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 21072) END FROM WidgetInst WHERE WidgetInstId = 21072) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21199;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21212) END FROM WidgetInst WHERE WidgetInstId = 21212) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21213;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21212) END FROM WidgetInst WHERE WidgetInstId = 21212) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21215;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21212) END FROM WidgetInst WHERE WidgetInstId = 21212) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21217;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 21072) END FROM WidgetInst WHERE WidgetInstId = 21072) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21219;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 21232) END FROM WidgetInst WHERE WidgetInstId = 21232) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21233;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 21232) END FROM WidgetInst WHERE WidgetInstId = 21232) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21235;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 21232) END FROM WidgetInst WHERE WidgetInstId = 21232) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21237;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21238) END FROM WidgetInst WHERE WidgetInstId = 21238) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 21232) END FROM WidgetInst WHERE WidgetInstId = 21232)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21239;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21238) END FROM WidgetInst WHERE WidgetInstId = 21238) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 21232) END FROM WidgetInst WHERE WidgetInstId = 21232)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21241;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21238) END FROM WidgetInst WHERE WidgetInstId = 21238) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 21232) END FROM WidgetInst WHERE WidgetInstId = 21232)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21243;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 21072) END FROM WidgetInst WHERE WidgetInstId = 21072) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21245;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21247) END FROM WidgetInst WHERE WidgetInstId = 21247) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21248;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21247) END FROM WidgetInst WHERE WidgetInstId = 21247) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21251;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 21247) END FROM WidgetInst WHERE WidgetInstId = 21247) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21254;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 21247) END FROM WidgetInst WHERE WidgetInstId = 21247) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21265;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 21072) END FROM WidgetInst WHERE WidgetInstId = 21072) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21268;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21271) END FROM WidgetInst WHERE WidgetInstId = 21271) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21272;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21271) END FROM WidgetInst WHERE WidgetInstId = 21271) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21275;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 21271) END FROM WidgetInst WHERE WidgetInstId = 21271) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21278;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 21271) END FROM WidgetInst WHERE WidgetInstId = 21271) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21289;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 21293) END FROM WidgetInst WHERE WidgetInstId = 21293) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21294;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 21293) END FROM WidgetInst WHERE WidgetInstId = 21293) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21296;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 21293) END FROM WidgetInst WHERE WidgetInstId = 21293) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21298;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 21293) END FROM WidgetInst WHERE WidgetInstId = 21293) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21300;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 21293) END FROM WidgetInst WHERE WidgetInstId = 21293) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21302;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 21293) END FROM WidgetInst WHERE WidgetInstId = 21293) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21304;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 21072) END FROM WidgetInst WHERE WidgetInstId = 21072) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 18520) END FROM WidgetInst WHERE WidgetInstId = 18520)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21306;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 21308) END FROM WidgetInst WHERE WidgetInstId = 21308) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21309;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 21313;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 21313;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 21313;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 21313;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 21313;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 21313;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 21313) END FROM WidgetInst WHERE WidgetInstId = 21313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21314;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 21316) END FROM WidgetInst WHERE WidgetInstId = 21316) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21317;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 21313) END FROM WidgetInst WHERE WidgetInstId = 21313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21319;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21325;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21328;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 21313) END FROM WidgetInst WHERE WidgetInstId = 21313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21331;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21333) END FROM WidgetInst WHERE WidgetInstId = 21333) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21334;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21333) END FROM WidgetInst WHERE WidgetInstId = 21333) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21337;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 21313) END FROM WidgetInst WHERE WidgetInstId = 21313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21340;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21342) END FROM WidgetInst WHERE WidgetInstId = 21342) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21343;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21342) END FROM WidgetInst WHERE WidgetInstId = 21342) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21346;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 21342) END FROM WidgetInst WHERE WidgetInstId = 21342) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21349;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 21313) END FROM WidgetInst WHERE WidgetInstId = 21313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21352;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 21313) END FROM WidgetInst WHERE WidgetInstId = 21313) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21354) END FROM WidgetInst WHERE WidgetInstId = 21354)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21357;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21356) END FROM WidgetInst WHERE WidgetInstId = 21356) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21360;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21356) END FROM WidgetInst WHERE WidgetInstId = 21356) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21361;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21356) END FROM WidgetInst WHERE WidgetInstId = 21356) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21364;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21356) END FROM WidgetInst WHERE WidgetInstId = 21356) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21365;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 21313) END FROM WidgetInst WHERE WidgetInstId = 21313) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21354) END FROM WidgetInst WHERE WidgetInstId = 21354)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21366;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21356) END FROM WidgetInst WHERE WidgetInstId = 21356) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21369;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21356) END FROM WidgetInst WHERE WidgetInstId = 21356) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21370;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21372) END FROM WidgetInst WHERE WidgetInstId = 21372) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21373;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21356) END FROM WidgetInst WHERE WidgetInstId = 21356) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21375;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21356) END FROM WidgetInst WHERE WidgetInstId = 21356) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21376;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 21372) END FROM WidgetInst WHERE WidgetInstId = 21372) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21377;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21356) END FROM WidgetInst WHERE WidgetInstId = 21356) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21379;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21356) END FROM WidgetInst WHERE WidgetInstId = 21356) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21380;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 21313) END FROM WidgetInst WHERE WidgetInstId = 21313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21381;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 21313) END FROM WidgetInst WHERE WidgetInstId = 21313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21384;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21417) END FROM WidgetInst WHERE WidgetInstId = 21417) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21418;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21417) END FROM WidgetInst WHERE WidgetInstId = 21417) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21420;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21417) END FROM WidgetInst WHERE WidgetInstId = 21417) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21422;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 21313) END FROM WidgetInst WHERE WidgetInstId = 21313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21424;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21433) END FROM WidgetInst WHERE WidgetInstId = 21433) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21434;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21433) END FROM WidgetInst WHERE WidgetInstId = 21433) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21436;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21433) END FROM WidgetInst WHERE WidgetInstId = 21433) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21438;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 21313) END FROM WidgetInst WHERE WidgetInstId = 21313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21440;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21453) END FROM WidgetInst WHERE WidgetInstId = 21453) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21454;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21453) END FROM WidgetInst WHERE WidgetInstId = 21453) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21456;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21453) END FROM WidgetInst WHERE WidgetInstId = 21453) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21458;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 21313) END FROM WidgetInst WHERE WidgetInstId = 21313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21460;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 21473) END FROM WidgetInst WHERE WidgetInstId = 21473) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21474;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 21473) END FROM WidgetInst WHERE WidgetInstId = 21473) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21476;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 21473) END FROM WidgetInst WHERE WidgetInstId = 21473) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21478;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21479) END FROM WidgetInst WHERE WidgetInstId = 21479) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 21473) END FROM WidgetInst WHERE WidgetInstId = 21473)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21480;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21479) END FROM WidgetInst WHERE WidgetInstId = 21479) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 21473) END FROM WidgetInst WHERE WidgetInstId = 21473)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21482;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21479) END FROM WidgetInst WHERE WidgetInstId = 21479) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 21473) END FROM WidgetInst WHERE WidgetInstId = 21473)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21484;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 21313) END FROM WidgetInst WHERE WidgetInstId = 21313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21486;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21488) END FROM WidgetInst WHERE WidgetInstId = 21488) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21489;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21488) END FROM WidgetInst WHERE WidgetInstId = 21488) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21492;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 21488) END FROM WidgetInst WHERE WidgetInstId = 21488) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21495;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 21488) END FROM WidgetInst WHERE WidgetInstId = 21488) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21506;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 21313) END FROM WidgetInst WHERE WidgetInstId = 21313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21509;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21512) END FROM WidgetInst WHERE WidgetInstId = 21512) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21513;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21512) END FROM WidgetInst WHERE WidgetInstId = 21512) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21516;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 21512) END FROM WidgetInst WHERE WidgetInstId = 21512) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21519;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 21512) END FROM WidgetInst WHERE WidgetInstId = 21512) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21530;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 21534) END FROM WidgetInst WHERE WidgetInstId = 21534) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21535;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 21534) END FROM WidgetInst WHERE WidgetInstId = 21534) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21537;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 21534) END FROM WidgetInst WHERE WidgetInstId = 21534) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21539;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 21534) END FROM WidgetInst WHERE WidgetInstId = 21534) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21541;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 21534) END FROM WidgetInst WHERE WidgetInstId = 21534) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21543;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 21534) END FROM WidgetInst WHERE WidgetInstId = 21534) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21545;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 21313) END FROM WidgetInst WHERE WidgetInstId = 21313) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 18520) END FROM WidgetInst WHERE WidgetInstId = 18520)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21547;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 21549) END FROM WidgetInst WHERE WidgetInstId = 21549) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21550;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 21554;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 21554;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 21554;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 21554;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 21554;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 21554;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 21554) END FROM WidgetInst WHERE WidgetInstId = 21554) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21555;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 21557) END FROM WidgetInst WHERE WidgetInstId = 21557) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21558;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 21554) END FROM WidgetInst WHERE WidgetInstId = 21554) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21560;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21566;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21569;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 21554) END FROM WidgetInst WHERE WidgetInstId = 21554) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21572;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21574) END FROM WidgetInst WHERE WidgetInstId = 21574) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21575;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21574) END FROM WidgetInst WHERE WidgetInstId = 21574) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21578;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 21554) END FROM WidgetInst WHERE WidgetInstId = 21554) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21581;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21583) END FROM WidgetInst WHERE WidgetInstId = 21583) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21584;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21583) END FROM WidgetInst WHERE WidgetInstId = 21583) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21587;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 21583) END FROM WidgetInst WHERE WidgetInstId = 21583) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21590;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 21554) END FROM WidgetInst WHERE WidgetInstId = 21554) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21593;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 21554) END FROM WidgetInst WHERE WidgetInstId = 21554) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21595) END FROM WidgetInst WHERE WidgetInstId = 21595)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21598;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21597) END FROM WidgetInst WHERE WidgetInstId = 21597) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21601;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21597) END FROM WidgetInst WHERE WidgetInstId = 21597) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21602;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21597) END FROM WidgetInst WHERE WidgetInstId = 21597) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21605;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21597) END FROM WidgetInst WHERE WidgetInstId = 21597) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21606;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 21554) END FROM WidgetInst WHERE WidgetInstId = 21554) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21595) END FROM WidgetInst WHERE WidgetInstId = 21595)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21607;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21597) END FROM WidgetInst WHERE WidgetInstId = 21597) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21610;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21597) END FROM WidgetInst WHERE WidgetInstId = 21597) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21611;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21613) END FROM WidgetInst WHERE WidgetInstId = 21613) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21614;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21597) END FROM WidgetInst WHERE WidgetInstId = 21597) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21616;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21597) END FROM WidgetInst WHERE WidgetInstId = 21597) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21617;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 21613) END FROM WidgetInst WHERE WidgetInstId = 21613) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21618;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21597) END FROM WidgetInst WHERE WidgetInstId = 21597) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21620;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21597) END FROM WidgetInst WHERE WidgetInstId = 21597) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21621;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 21554) END FROM WidgetInst WHERE WidgetInstId = 21554) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21622;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 21554) END FROM WidgetInst WHERE WidgetInstId = 21554) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21625;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21658) END FROM WidgetInst WHERE WidgetInstId = 21658) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21659;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21658) END FROM WidgetInst WHERE WidgetInstId = 21658) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21661;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21658) END FROM WidgetInst WHERE WidgetInstId = 21658) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21663;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 21554) END FROM WidgetInst WHERE WidgetInstId = 21554) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21665;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21674) END FROM WidgetInst WHERE WidgetInstId = 21674) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21675;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21674) END FROM WidgetInst WHERE WidgetInstId = 21674) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21677;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21674) END FROM WidgetInst WHERE WidgetInstId = 21674) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21679;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 21554) END FROM WidgetInst WHERE WidgetInstId = 21554) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21681;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21694) END FROM WidgetInst WHERE WidgetInstId = 21694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21695;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21694) END FROM WidgetInst WHERE WidgetInstId = 21694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21697;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21694) END FROM WidgetInst WHERE WidgetInstId = 21694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21699;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 21554) END FROM WidgetInst WHERE WidgetInstId = 21554) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21701;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 21714) END FROM WidgetInst WHERE WidgetInstId = 21714) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21715;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 21714) END FROM WidgetInst WHERE WidgetInstId = 21714) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21717;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 21714) END FROM WidgetInst WHERE WidgetInstId = 21714) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21719;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21720) END FROM WidgetInst WHERE WidgetInstId = 21720) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 21714) END FROM WidgetInst WHERE WidgetInstId = 21714)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21721;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21720) END FROM WidgetInst WHERE WidgetInstId = 21720) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 21714) END FROM WidgetInst WHERE WidgetInstId = 21714)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21723;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21720) END FROM WidgetInst WHERE WidgetInstId = 21720) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 21714) END FROM WidgetInst WHERE WidgetInstId = 21714)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21725;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 21554) END FROM WidgetInst WHERE WidgetInstId = 21554) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21727;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21729) END FROM WidgetInst WHERE WidgetInstId = 21729) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21730;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21729) END FROM WidgetInst WHERE WidgetInstId = 21729) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21733;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 21729) END FROM WidgetInst WHERE WidgetInstId = 21729) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21736;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 21729) END FROM WidgetInst WHERE WidgetInstId = 21729) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21747;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 21554) END FROM WidgetInst WHERE WidgetInstId = 21554) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21750;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21753) END FROM WidgetInst WHERE WidgetInstId = 21753) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21754;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21753) END FROM WidgetInst WHERE WidgetInstId = 21753) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21757;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 21753) END FROM WidgetInst WHERE WidgetInstId = 21753) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21760;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 21753) END FROM WidgetInst WHERE WidgetInstId = 21753) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21771;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 21775) END FROM WidgetInst WHERE WidgetInstId = 21775) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21776;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 21775) END FROM WidgetInst WHERE WidgetInstId = 21775) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21778;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 21775) END FROM WidgetInst WHERE WidgetInstId = 21775) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21780;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 21775) END FROM WidgetInst WHERE WidgetInstId = 21775) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21782;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 21775) END FROM WidgetInst WHERE WidgetInstId = 21775) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21784;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 21775) END FROM WidgetInst WHERE WidgetInstId = 21775) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21786;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 21554) END FROM WidgetInst WHERE WidgetInstId = 21554) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 18520) END FROM WidgetInst WHERE WidgetInstId = 18520)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21788;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 21790) END FROM WidgetInst WHERE WidgetInstId = 21790) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21791;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 21795;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 21795;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 21795;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 21795;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 21795;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 21795;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 21795) END FROM WidgetInst WHERE WidgetInstId = 21795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21796;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 21798) END FROM WidgetInst WHERE WidgetInstId = 21798) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21799;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 21795) END FROM WidgetInst WHERE WidgetInstId = 21795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21801;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21807;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21810;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 21795) END FROM WidgetInst WHERE WidgetInstId = 21795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21813;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21815) END FROM WidgetInst WHERE WidgetInstId = 21815) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21816;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21815) END FROM WidgetInst WHERE WidgetInstId = 21815) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21819;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 21795) END FROM WidgetInst WHERE WidgetInstId = 21795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21822;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21824) END FROM WidgetInst WHERE WidgetInstId = 21824) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21825;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21824) END FROM WidgetInst WHERE WidgetInstId = 21824) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21828;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 21824) END FROM WidgetInst WHERE WidgetInstId = 21824) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21831;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 21795) END FROM WidgetInst WHERE WidgetInstId = 21795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21834;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 21795) END FROM WidgetInst WHERE WidgetInstId = 21795) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21836) END FROM WidgetInst WHERE WidgetInstId = 21836)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21839;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21838) END FROM WidgetInst WHERE WidgetInstId = 21838) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21842;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21838) END FROM WidgetInst WHERE WidgetInstId = 21838) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21843;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21838) END FROM WidgetInst WHERE WidgetInstId = 21838) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21846;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21838) END FROM WidgetInst WHERE WidgetInstId = 21838) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21847;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 21795) END FROM WidgetInst WHERE WidgetInstId = 21795) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21836) END FROM WidgetInst WHERE WidgetInstId = 21836)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21848;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21838) END FROM WidgetInst WHERE WidgetInstId = 21838) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21851;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21838) END FROM WidgetInst WHERE WidgetInstId = 21838) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21852;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21854) END FROM WidgetInst WHERE WidgetInstId = 21854) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21855;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21838) END FROM WidgetInst WHERE WidgetInstId = 21838) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21857;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21838) END FROM WidgetInst WHERE WidgetInstId = 21838) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21858;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 21854) END FROM WidgetInst WHERE WidgetInstId = 21854) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21859;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 21838) END FROM WidgetInst WHERE WidgetInstId = 21838) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21861;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 21838) END FROM WidgetInst WHERE WidgetInstId = 21838) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21862;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 21795) END FROM WidgetInst WHERE WidgetInstId = 21795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21863;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 21795) END FROM WidgetInst WHERE WidgetInstId = 21795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21866;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21899) END FROM WidgetInst WHERE WidgetInstId = 21899) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21900;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21899) END FROM WidgetInst WHERE WidgetInstId = 21899) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21902;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21899) END FROM WidgetInst WHERE WidgetInstId = 21899) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21904;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 21795) END FROM WidgetInst WHERE WidgetInstId = 21795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21906;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21915) END FROM WidgetInst WHERE WidgetInstId = 21915) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21916;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21915) END FROM WidgetInst WHERE WidgetInstId = 21915) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21918;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21915) END FROM WidgetInst WHERE WidgetInstId = 21915) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21920;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 21795) END FROM WidgetInst WHERE WidgetInstId = 21795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21922;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21935) END FROM WidgetInst WHERE WidgetInstId = 21935) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21936;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21935) END FROM WidgetInst WHERE WidgetInstId = 21935) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21938;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21935) END FROM WidgetInst WHERE WidgetInstId = 21935) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21940;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 21795) END FROM WidgetInst WHERE WidgetInstId = 21795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21942;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 21955) END FROM WidgetInst WHERE WidgetInstId = 21955) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21956;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 21955) END FROM WidgetInst WHERE WidgetInstId = 21955) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21958;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 21955) END FROM WidgetInst WHERE WidgetInstId = 21955) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21960;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21961) END FROM WidgetInst WHERE WidgetInstId = 21961) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 21955) END FROM WidgetInst WHERE WidgetInstId = 21955)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21962;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21961) END FROM WidgetInst WHERE WidgetInstId = 21961) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 21955) END FROM WidgetInst WHERE WidgetInstId = 21955)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21964;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 21961) END FROM WidgetInst WHERE WidgetInstId = 21961) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 21955) END FROM WidgetInst WHERE WidgetInstId = 21955)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21966;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 21795) END FROM WidgetInst WHERE WidgetInstId = 21795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21968;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21970) END FROM WidgetInst WHERE WidgetInstId = 21970) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21971;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21970) END FROM WidgetInst WHERE WidgetInstId = 21970) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21974;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 21970) END FROM WidgetInst WHERE WidgetInstId = 21970) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21977;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 21970) END FROM WidgetInst WHERE WidgetInstId = 21970) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21988;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 21795) END FROM WidgetInst WHERE WidgetInstId = 21795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21991;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 21994) END FROM WidgetInst WHERE WidgetInstId = 21994) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21995;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 21994) END FROM WidgetInst WHERE WidgetInstId = 21994) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21998;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 21994) END FROM WidgetInst WHERE WidgetInstId = 21994) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22001;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 21994) END FROM WidgetInst WHERE WidgetInstId = 21994) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22012;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 22016) END FROM WidgetInst WHERE WidgetInstId = 22016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22017;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22016) END FROM WidgetInst WHERE WidgetInstId = 22016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22019;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22016) END FROM WidgetInst WHERE WidgetInstId = 22016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22021;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22016) END FROM WidgetInst WHERE WidgetInstId = 22016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22023;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22016) END FROM WidgetInst WHERE WidgetInstId = 22016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22025;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22016) END FROM WidgetInst WHERE WidgetInstId = 22016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22027;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 21795) END FROM WidgetInst WHERE WidgetInstId = 21795) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 18520) END FROM WidgetInst WHERE WidgetInstId = 18520)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22029;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 22031) END FROM WidgetInst WHERE WidgetInstId = 22031) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22032;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 22036;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 22036;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 22036;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 22036;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 22036;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 22036;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 22036) END FROM WidgetInst WHERE WidgetInstId = 22036) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22037;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 22039) END FROM WidgetInst WHERE WidgetInstId = 22039) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22040;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 22036) END FROM WidgetInst WHERE WidgetInstId = 22036) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22042;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22048;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22051;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 22036) END FROM WidgetInst WHERE WidgetInstId = 22036) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22054;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 22056) END FROM WidgetInst WHERE WidgetInstId = 22056) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22057;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22056) END FROM WidgetInst WHERE WidgetInstId = 22056) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22060;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 22036) END FROM WidgetInst WHERE WidgetInstId = 22036) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22063;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 22065) END FROM WidgetInst WHERE WidgetInstId = 22065) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22066;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22065) END FROM WidgetInst WHERE WidgetInstId = 22065) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22069;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 22065) END FROM WidgetInst WHERE WidgetInstId = 22065) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22072;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 22036) END FROM WidgetInst WHERE WidgetInstId = 22036) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22075;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 22036) END FROM WidgetInst WHERE WidgetInstId = 22036) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 22077) END FROM WidgetInst WHERE WidgetInstId = 22077)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22080;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 22079) END FROM WidgetInst WHERE WidgetInstId = 22079) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22083;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 22079) END FROM WidgetInst WHERE WidgetInstId = 22079) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22084;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 22079) END FROM WidgetInst WHERE WidgetInstId = 22079) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22087;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 22079) END FROM WidgetInst WHERE WidgetInstId = 22079) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22088;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 22036) END FROM WidgetInst WHERE WidgetInstId = 22036) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22077) END FROM WidgetInst WHERE WidgetInstId = 22077)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22089;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 22079) END FROM WidgetInst WHERE WidgetInstId = 22079) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22092;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 22079) END FROM WidgetInst WHERE WidgetInstId = 22079) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22093;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22095) END FROM WidgetInst WHERE WidgetInstId = 22095) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22096;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 22079) END FROM WidgetInst WHERE WidgetInstId = 22079) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22098;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 22079) END FROM WidgetInst WHERE WidgetInstId = 22079) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22099;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 22095) END FROM WidgetInst WHERE WidgetInstId = 22095) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22100;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 22079) END FROM WidgetInst WHERE WidgetInstId = 22079) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22102;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 22079) END FROM WidgetInst WHERE WidgetInstId = 22079) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22103;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 22036) END FROM WidgetInst WHERE WidgetInstId = 22036) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22104;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 22036) END FROM WidgetInst WHERE WidgetInstId = 22036) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22107;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22140) END FROM WidgetInst WHERE WidgetInstId = 22140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22141;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22140) END FROM WidgetInst WHERE WidgetInstId = 22140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22143;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22140) END FROM WidgetInst WHERE WidgetInstId = 22140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22145;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 22036) END FROM WidgetInst WHERE WidgetInstId = 22036) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22147;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22156) END FROM WidgetInst WHERE WidgetInstId = 22156) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22157;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22156) END FROM WidgetInst WHERE WidgetInstId = 22156) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22159;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22156) END FROM WidgetInst WHERE WidgetInstId = 22156) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22161;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 22036) END FROM WidgetInst WHERE WidgetInstId = 22036) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22163;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22176) END FROM WidgetInst WHERE WidgetInstId = 22176) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22177;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22176) END FROM WidgetInst WHERE WidgetInstId = 22176) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22179;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22176) END FROM WidgetInst WHERE WidgetInstId = 22176) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22181;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 22036) END FROM WidgetInst WHERE WidgetInstId = 22036) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22183;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22196) END FROM WidgetInst WHERE WidgetInstId = 22196) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22197;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22196) END FROM WidgetInst WHERE WidgetInstId = 22196) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22199;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22196) END FROM WidgetInst WHERE WidgetInstId = 22196) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22201;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22202) END FROM WidgetInst WHERE WidgetInstId = 22202) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22196) END FROM WidgetInst WHERE WidgetInstId = 22196)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22203;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22202) END FROM WidgetInst WHERE WidgetInstId = 22202) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22196) END FROM WidgetInst WHERE WidgetInstId = 22196)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22205;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22202) END FROM WidgetInst WHERE WidgetInstId = 22202) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22196) END FROM WidgetInst WHERE WidgetInstId = 22196)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22207;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 22036) END FROM WidgetInst WHERE WidgetInstId = 22036) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22209;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 22211) END FROM WidgetInst WHERE WidgetInstId = 22211) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22212;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22211) END FROM WidgetInst WHERE WidgetInstId = 22211) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22215;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 22211) END FROM WidgetInst WHERE WidgetInstId = 22211) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22218;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 22211) END FROM WidgetInst WHERE WidgetInstId = 22211) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22229;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 22036) END FROM WidgetInst WHERE WidgetInstId = 22036) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22232;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 22235) END FROM WidgetInst WHERE WidgetInstId = 22235) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22236;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22235) END FROM WidgetInst WHERE WidgetInstId = 22235) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22239;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 22235) END FROM WidgetInst WHERE WidgetInstId = 22235) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22242;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 22235) END FROM WidgetInst WHERE WidgetInstId = 22235) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22253;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 22257) END FROM WidgetInst WHERE WidgetInstId = 22257) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22258;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22257) END FROM WidgetInst WHERE WidgetInstId = 22257) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22260;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22257) END FROM WidgetInst WHERE WidgetInstId = 22257) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22262;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22257) END FROM WidgetInst WHERE WidgetInstId = 22257) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22264;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22257) END FROM WidgetInst WHERE WidgetInstId = 22257) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22266;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22257) END FROM WidgetInst WHERE WidgetInstId = 22257) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22268;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 22036) END FROM WidgetInst WHERE WidgetInstId = 22036) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 18520) END FROM WidgetInst WHERE WidgetInstId = 18520)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22270;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 22272) END FROM WidgetInst WHERE WidgetInstId = 22272) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22273;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 22277;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 22277;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 22277;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 22277;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 22277;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 22277;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 22277) END FROM WidgetInst WHERE WidgetInstId = 22277) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22278;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 22280) END FROM WidgetInst WHERE WidgetInstId = 22280) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22281;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 22277) END FROM WidgetInst WHERE WidgetInstId = 22277) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22283;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22289;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22292;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 22277) END FROM WidgetInst WHERE WidgetInstId = 22277) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22295;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 22297) END FROM WidgetInst WHERE WidgetInstId = 22297) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22298;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22297) END FROM WidgetInst WHERE WidgetInstId = 22297) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22301;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 22277) END FROM WidgetInst WHERE WidgetInstId = 22277) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22304;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 22306) END FROM WidgetInst WHERE WidgetInstId = 22306) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22307;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22306) END FROM WidgetInst WHERE WidgetInstId = 22306) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22310;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 22306) END FROM WidgetInst WHERE WidgetInstId = 22306) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22313;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 22277) END FROM WidgetInst WHERE WidgetInstId = 22277) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22316;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 22277) END FROM WidgetInst WHERE WidgetInstId = 22277) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 22318) END FROM WidgetInst WHERE WidgetInstId = 22318)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22321;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 22320) END FROM WidgetInst WHERE WidgetInstId = 22320) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22324;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 22320) END FROM WidgetInst WHERE WidgetInstId = 22320) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22325;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 22320) END FROM WidgetInst WHERE WidgetInstId = 22320) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22328;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 22320) END FROM WidgetInst WHERE WidgetInstId = 22320) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22329;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 22277) END FROM WidgetInst WHERE WidgetInstId = 22277) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22318) END FROM WidgetInst WHERE WidgetInstId = 22318)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22330;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 22320) END FROM WidgetInst WHERE WidgetInstId = 22320) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22333;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 22320) END FROM WidgetInst WHERE WidgetInstId = 22320) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22334;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22336) END FROM WidgetInst WHERE WidgetInstId = 22336) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22337;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 22320) END FROM WidgetInst WHERE WidgetInstId = 22320) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22339;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 22320) END FROM WidgetInst WHERE WidgetInstId = 22320) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22340;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 22336) END FROM WidgetInst WHERE WidgetInstId = 22336) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22341;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 22320) END FROM WidgetInst WHERE WidgetInstId = 22320) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22343;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 22320) END FROM WidgetInst WHERE WidgetInstId = 22320) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22344;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 22277) END FROM WidgetInst WHERE WidgetInstId = 22277) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22345;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 22277) END FROM WidgetInst WHERE WidgetInstId = 22277) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22348;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22381) END FROM WidgetInst WHERE WidgetInstId = 22381) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22382;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22381) END FROM WidgetInst WHERE WidgetInstId = 22381) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22384;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22381) END FROM WidgetInst WHERE WidgetInstId = 22381) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22386;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 22277) END FROM WidgetInst WHERE WidgetInstId = 22277) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22388;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22397) END FROM WidgetInst WHERE WidgetInstId = 22397) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22398;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22397) END FROM WidgetInst WHERE WidgetInstId = 22397) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22400;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22397) END FROM WidgetInst WHERE WidgetInstId = 22397) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22402;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 22277) END FROM WidgetInst WHERE WidgetInstId = 22277) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22404;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22417) END FROM WidgetInst WHERE WidgetInstId = 22417) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22418;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22417) END FROM WidgetInst WHERE WidgetInstId = 22417) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22420;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22417) END FROM WidgetInst WHERE WidgetInstId = 22417) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22422;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 22277) END FROM WidgetInst WHERE WidgetInstId = 22277) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22424;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22437) END FROM WidgetInst WHERE WidgetInstId = 22437) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22438;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22437) END FROM WidgetInst WHERE WidgetInstId = 22437) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22440;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22437) END FROM WidgetInst WHERE WidgetInstId = 22437) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22442;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22443) END FROM WidgetInst WHERE WidgetInstId = 22443) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22437) END FROM WidgetInst WHERE WidgetInstId = 22437)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22444;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22443) END FROM WidgetInst WHERE WidgetInstId = 22443) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22437) END FROM WidgetInst WHERE WidgetInstId = 22437)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22446;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22443) END FROM WidgetInst WHERE WidgetInstId = 22443) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22437) END FROM WidgetInst WHERE WidgetInstId = 22437)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22448;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 22277) END FROM WidgetInst WHERE WidgetInstId = 22277) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22450;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 22452) END FROM WidgetInst WHERE WidgetInstId = 22452) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22453;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22452) END FROM WidgetInst WHERE WidgetInstId = 22452) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22456;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 22452) END FROM WidgetInst WHERE WidgetInstId = 22452) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22459;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 22452) END FROM WidgetInst WHERE WidgetInstId = 22452) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22470;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 22277) END FROM WidgetInst WHERE WidgetInstId = 22277) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22473;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 22476) END FROM WidgetInst WHERE WidgetInstId = 22476) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22477;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22476) END FROM WidgetInst WHERE WidgetInstId = 22476) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22480;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 22476) END FROM WidgetInst WHERE WidgetInstId = 22476) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22483;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 22476) END FROM WidgetInst WHERE WidgetInstId = 22476) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22494;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 22498) END FROM WidgetInst WHERE WidgetInstId = 22498) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22499;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22498) END FROM WidgetInst WHERE WidgetInstId = 22498) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22501;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22498) END FROM WidgetInst WHERE WidgetInstId = 22498) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22503;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22498) END FROM WidgetInst WHERE WidgetInstId = 22498) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22505;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22498) END FROM WidgetInst WHERE WidgetInstId = 22498) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22507;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22498) END FROM WidgetInst WHERE WidgetInstId = 22498) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22509;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 22277) END FROM WidgetInst WHERE WidgetInstId = 22277) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 18520) END FROM WidgetInst WHERE WidgetInstId = 18520)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22511;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 22513) END FROM WidgetInst WHERE WidgetInstId = 22513) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22514;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 22518;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 22518;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 22518;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 22518;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 22518;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 22518;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 22518) END FROM WidgetInst WHERE WidgetInstId = 22518) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22519;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 22521) END FROM WidgetInst WHERE WidgetInstId = 22521) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22522;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 22518) END FROM WidgetInst WHERE WidgetInstId = 22518) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22524;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22530;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22533;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 22518) END FROM WidgetInst WHERE WidgetInstId = 22518) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22536;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 22538) END FROM WidgetInst WHERE WidgetInstId = 22538) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22539;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22538) END FROM WidgetInst WHERE WidgetInstId = 22538) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22542;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 22518) END FROM WidgetInst WHERE WidgetInstId = 22518) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22545;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 22547) END FROM WidgetInst WHERE WidgetInstId = 22547) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22548;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22547) END FROM WidgetInst WHERE WidgetInstId = 22547) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22551;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 22547) END FROM WidgetInst WHERE WidgetInstId = 22547) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22554;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 22518) END FROM WidgetInst WHERE WidgetInstId = 22518) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22557;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 22518) END FROM WidgetInst WHERE WidgetInstId = 22518) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 22559) END FROM WidgetInst WHERE WidgetInstId = 22559)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22562;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 22561) END FROM WidgetInst WHERE WidgetInstId = 22561) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22565;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 22561) END FROM WidgetInst WHERE WidgetInstId = 22561) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22566;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 22561) END FROM WidgetInst WHERE WidgetInstId = 22561) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22569;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 22561) END FROM WidgetInst WHERE WidgetInstId = 22561) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22570;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 22518) END FROM WidgetInst WHERE WidgetInstId = 22518) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22559) END FROM WidgetInst WHERE WidgetInstId = 22559)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22571;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 22561) END FROM WidgetInst WHERE WidgetInstId = 22561) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22574;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 22561) END FROM WidgetInst WHERE WidgetInstId = 22561) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22575;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22577) END FROM WidgetInst WHERE WidgetInstId = 22577) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22578;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 22561) END FROM WidgetInst WHERE WidgetInstId = 22561) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22580;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 22561) END FROM WidgetInst WHERE WidgetInstId = 22561) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22581;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 22577) END FROM WidgetInst WHERE WidgetInstId = 22577) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22582;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 22561) END FROM WidgetInst WHERE WidgetInstId = 22561) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22584;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 22561) END FROM WidgetInst WHERE WidgetInstId = 22561) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22585;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 22518) END FROM WidgetInst WHERE WidgetInstId = 22518) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22586;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 22518) END FROM WidgetInst WHERE WidgetInstId = 22518) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22589;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22622) END FROM WidgetInst WHERE WidgetInstId = 22622) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22623;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22622) END FROM WidgetInst WHERE WidgetInstId = 22622) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22625;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22622) END FROM WidgetInst WHERE WidgetInstId = 22622) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22627;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 22518) END FROM WidgetInst WHERE WidgetInstId = 22518) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22629;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22638) END FROM WidgetInst WHERE WidgetInstId = 22638) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22639;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22638) END FROM WidgetInst WHERE WidgetInstId = 22638) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22641;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22638) END FROM WidgetInst WHERE WidgetInstId = 22638) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22643;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 22518) END FROM WidgetInst WHERE WidgetInstId = 22518) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22645;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22658) END FROM WidgetInst WHERE WidgetInstId = 22658) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22659;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22658) END FROM WidgetInst WHERE WidgetInstId = 22658) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22661;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22658) END FROM WidgetInst WHERE WidgetInstId = 22658) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22663;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 22518) END FROM WidgetInst WHERE WidgetInstId = 22518) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22665;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22678) END FROM WidgetInst WHERE WidgetInstId = 22678) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22679;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22678) END FROM WidgetInst WHERE WidgetInstId = 22678) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22681;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22678) END FROM WidgetInst WHERE WidgetInstId = 22678) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22683;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22684) END FROM WidgetInst WHERE WidgetInstId = 22684) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22678) END FROM WidgetInst WHERE WidgetInstId = 22678)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22685;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22684) END FROM WidgetInst WHERE WidgetInstId = 22684) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22678) END FROM WidgetInst WHERE WidgetInstId = 22678)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22687;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22684) END FROM WidgetInst WHERE WidgetInstId = 22684) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22678) END FROM WidgetInst WHERE WidgetInstId = 22678)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22689;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 22518) END FROM WidgetInst WHERE WidgetInstId = 22518) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22691;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 22693) END FROM WidgetInst WHERE WidgetInstId = 22693) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22694;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22693) END FROM WidgetInst WHERE WidgetInstId = 22693) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22697;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 22693) END FROM WidgetInst WHERE WidgetInstId = 22693) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22700;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 22693) END FROM WidgetInst WHERE WidgetInstId = 22693) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22711;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 22518) END FROM WidgetInst WHERE WidgetInstId = 22518) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22714;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 22717) END FROM WidgetInst WHERE WidgetInstId = 22717) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22718;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22717) END FROM WidgetInst WHERE WidgetInstId = 22717) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22721;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 22717) END FROM WidgetInst WHERE WidgetInstId = 22717) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22724;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 22717) END FROM WidgetInst WHERE WidgetInstId = 22717) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22735;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 22739) END FROM WidgetInst WHERE WidgetInstId = 22739) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22740;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22739) END FROM WidgetInst WHERE WidgetInstId = 22739) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22742;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22739) END FROM WidgetInst WHERE WidgetInstId = 22739) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22744;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22739) END FROM WidgetInst WHERE WidgetInstId = 22739) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22746;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22739) END FROM WidgetInst WHERE WidgetInstId = 22739) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22748;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22739) END FROM WidgetInst WHERE WidgetInstId = 22739) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22750;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 22518) END FROM WidgetInst WHERE WidgetInstId = 22518) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 18520) END FROM WidgetInst WHERE WidgetInstId = 18520)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22752;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 22754) END FROM WidgetInst WHERE WidgetInstId = 22754) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22755;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 22759;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 22759;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 22759;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 22759;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 22759;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 22759;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 22759) END FROM WidgetInst WHERE WidgetInstId = 22759) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22760;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 22762) END FROM WidgetInst WHERE WidgetInstId = 22762) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22763;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 22759) END FROM WidgetInst WHERE WidgetInstId = 22759) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22765;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22771;


